﻿namespace = friends_rivals_interactions_events

#Rivals

friends_rivals_interactions_events.0002 = {  #The Stolen Falcon!
    type = character_event 
    title = friends_rivals_interactions_events.0002.t
    desc = friends_rivals_interactions_events.0002.desc

    theme = rival_relation   
    override_background = { reference = wilderness_forest_pine }   

    left_portrait = { 
        character = ROOT 
        animation = anger
    }
    right_portrait = { 
        character = scope:my_rival
        animation = laugh
    }

    trigger = {
        is_alive = yes 
    }

    immediate = {

        random_living_character = { 
            limit = { OR = { has_character_flag = rival_interaction_flag } }
            save_scope_as = my_rival
        }

        ROOT = { 
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { is_alive = yes age > 15 has_council_position = councillor_marshal liege = scope:me_scope }
            save_scope_as = marshal_scope
        }
        
    }

    option = {  #Normal Defuse Attempt
        name = friends_rivals_interactions_events.0002.a
        custom_tooltip = friends_rivals_interactions_events.0002.a.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = { 
            limit = { OR = { has_character_flag = rival_interaction_flag } }
            save_scope_as = my_rival
        }

        ROOT = { 
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { is_alive = yes age > 15 has_council_position = councillor_marshal liege = scope:me_scope }
            save_scope_as = marshal_scope
        }

        scope:marshal_scope = {  #Marshal Appreciates Your Generous Nature
            add_prestige = 10 
            add_opinion = {
                target = scope:me_scope
                modifier = hunt_generous_hunter_opinion
            }

            add_opinion = {
                target = scope:my_rival 
                modifier = opinion_hunt_craven_hunter
            }
        }

        scope:my_rival = {  #Rival Despises You Even More For Not Taking The Bait
            add_prestige = -100
            add_opinion = {
                target = scope:me_scope 
                modifier = rival_insult_opinion
            }

            add_opinion = {
                target = scope:marshal_scope
                modifier = rival_insult_opinion
            }
        }

        scope:me_scope = {
            stress_impact = {
                just = medium_stress_impact_loss
                compassionate = major_stress_impact_loss
                forgiving = major_stress_impact_loss
                sadistic = major_stress_impact_gain
                vengeful = medium_stress_impact_gain
                callous = medium_stress_impact_gain
            } 
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = {  #Take The Bait. Storm Away With All The Falcons
        name = friends_rivals_interactions_events.0002.b
        custom_tooltip = friends_rivals_interactions_events.0002.b.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = { 
            limit = { OR = { has_character_flag = rival_interaction_flag } }
            save_scope_as = my_rival
        }

        ROOT = { 
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { is_alive = yes age > 15 has_council_position = councillor_marshal liege = scope:me_scope }
            save_scope_as = marshal_scope
        }

        scope:marshal_scope = {
            add_prestige = -10
            add_opinion = {
                target = scope:me_scope 
                modifier = hunt_bad_hunter_opinion
            }

            add_opinion = {
                target = scope:my_rival 
                modifier = hunt_bad_hunter_opinion
            }
        }

        scope:my_rival = {
            add_prestige = 100
            add_opinion = {
                target = scope:me_scope 
                modifier = distrustful
            }

            add_opinion = {
                target = scope:marshal_scope
                modifier = opinion_hunt_craven_hunter
            }
        }

        scope:me_scope = {
            stress_impact = {
                just = medium_stress_impact_gain
                compassionate = major_stress_impact_gain
                forgiving = major_stress_impact_gain
                sadistic = major_stress_impact_loss
                vengeful = medium_stress_impact_loss
                callous = medium_stress_impact_loss
            } 
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = { #Noble Option. Let Your Rival Keep The Falcons, You Hunt With Your Senses
        name = friends_rivals_interactions_events.0002.c
        custom_tooltip = friends_rivals_interactions_events.0002.c.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = just
                has_trait = compassionate
                has_trait = forgiving
            }
        }

        random_living_character = { 
            limit = { OR = { has_character_flag = rival_interaction_flag } }
            save_scope_as = my_rival
        }

        ROOT = { 
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { is_alive = yes age > 15 has_council_position = councillor_marshal liege = scope:me_scope }
            save_scope_as = marshal_scope
        }

        scope:marshal_scope = {
            add_prestige = 50
            add_opinion = {
                target = scope:me_scope 
                modifier = loyal_servant
            }

            add_opinion = {
                target = scope:my_rival 
                modifier = rejected_opinion
            }
        }

        scope:my_rival = {
            add_prestige = -150 
            add_opinion = {
                target = scope:me_scope 
                modifier = rejected_opinion
            }

            add_opinion = {
                target = scope:marshal_scope
                modifier = rejected_opinion
            }
        }

        scope:me_scope = {
            stress_impact = {
                just = medium_stress_impact_loss
                compassionate = major_stress_impact_loss
                forgiving = major_stress_impact_loss
            } 
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = { #You are a psychopath. You kill your rival for this slight, along with the marshal for good measure to keep them quiet. You are a lunatic!
        name = friends_rivals_interactions_events.0002.d
        custom_tooltip = friends_rivals_interactions_events.0002.d.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = sadistic 
                has_trait = murderer
                has_trait = lunatic_1
                has_trait = possessed_1
            }
        }

        random_living_character = { 
            limit = { OR = { has_character_flag = rival_interaction_flag } }
            save_scope_as = my_rival
        }

        ROOT = { 
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { is_alive = yes age > 15 has_council_position = councillor_marshal liege = scope:me_scope }
            save_scope_as = marshal_scope
        }

        scope:my_rival = {
		    death = {
			    death_reason = death_mysterious
			    killer = scope:me_scope
		    }
	    }
	    scope:me_scope = {
		    add_secret = {
			    type = secret_murder
			    target = scope:my_rival
		    }
        }

        scope:marshal_scope = {
            death = {
                death_reason = death_mysterious
                killer = scope:me_scope
            }
        }

        scope:me_scope = {
            add_secret = {
                type = secret_murder
                target = scope:marshal_scope
            }
        }

       
        scope:me_scope = {
            add_prestige = -100
            add_piety = -100 
            stress_impact = {
                possessed_1 = medium_stress_impact_loss
                murderer = major_stress_impact_loss
                lunatic_1 = major_stress_impact_loss
                sadistic = major_stress_impact_loss
            } 
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }
}

friends_rivals_interactions_events.0003 = {  #The Poisioned Wine Gift...Or Is It?
    type = character_event
    title = friends_rivals_interactions_events.0003.t
    desc = friends_rivals_interactions_events.0003.desc

    theme = rival_relation
    override_background = {reference = feast }  

    left_portrait = { 
        character = ROOT 
        animation = worry
    }
    right_portrait = { 
        character = scope:my_rival
        animation = scheme
    }

    trigger = {
        is_alive = yes 
    }

    immediate = {
        random_living_character = { 
            limit = { OR = { has_character_flag = rival_interaction_flag } }
            save_scope_as = my_rival
        }

        ROOT = { 
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { is_alive = yes age > 15 is_courtier_of = scope:me_scope top_liege = scope:me_scope }
            save_scope_as = my_random_courtier
        }
    }

    option = {  #Be Cautious. Don't Drink The Wine.
        name = friends_rivals_interactions_events.0003.a
        custom_tooltip = friends_rivals_interactions_events.0003.a.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = { 
            limit = { OR = { has_character_flag = rival_interaction_flag } }
            save_scope_as = my_rival
        }

        ROOT = { 
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { is_alive = yes age > 15 is_courtier_of = scope:me_scope top_liege = scope:me_scope }
            save_scope_as = my_random_courtier
        }

        scope:my_random_courtier = {
            add_prestige = 25
            add_opinion = {
                target = scope:me_scope 
                modifier = softening_disposition_opinion
            }

            add_opinion = {
                target = scope:my_rival 
                modifier = bizarre_claims_opinion
            }
        }

        scope:my_rival = {
            add_prestige = -100
            add_opinion = {
                target = scope:me_scope 
                modifier = agitated_opinion
            }
        }

        scope:me_scope = {
            add_prestige = -50
            stress_impact = {
                calm = medium_stress_impact_loss
                patient = major_stress_impact_loss
                temperate = major_stress_impact_loss
                lunatic_1 = medium_stress_impact_gain
                ambitious = medium_stress_impact_gain
                brave = medium_stress_impact_gain
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = {  #I AM A LORD OR GREATER! I WILL NOT BE SCARED BY THIS WINE. You Drink The Wine, And See For Yourself If It Was Poisoned Or Not!
        name = friends_rivals_interactions_events.0003.b
        custom_tooltip = friends_rivals_interactions_events.0003.b.tooltip

        trigger = {
            is_alive = yes 
            OR = {
                has_trait = brave
                has_trait = lunatic_1
                has_trait = ambitious
            }
        }

        random_living_character = { 
            limit = { OR = { has_character_flag = rival_interaction_flag } }
            save_scope_as = my_rival
        }

        ROOT = { 
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { is_alive = yes age > 15 is_courtier_of = scope:me_scope top_liege = scope:me_scope }
            save_scope_as = my_random_courtier
        }

        random_list = {
            0 = { #The Wine Was Fine! Look How Brave You Are!

                scope:my_random_courtier = {
                    add_prestige = 100
                    add_opinion = {
                        target = scope:me_scope
                        modifier = loyalty_opinion
                    }

                    add_opinion = {
                        target = scope:my_rival 
                        modifier = laughingstock_opinion
                    }
                }

                scope:my_rival = {
                    add_prestige = -250
                    add_opinion = {
                        target = scope:me_scope
                        modifier = agitated_opinion
                    }
                }

                scope:me_scope = {
                    add_prestige = 50
                    stress_impact = {
                        brave = major_stress_impact_loss
                        lunatic_1 = major_stress_impact_loss
                        ambitious = major_stress_impact_loss
                    }
                }
            }

            100  = {  #That Was Dumb. The Wine Was Poisoned, And Now You Are Dead!

                scope:my_random_courtier = {
                    add_prestige = -50
                    add_opinion = {
                        target = scope:my_rival 
                        modifier = distrustful
                    }
                }

                scope:my_rival = {
                    add_prestige = 250
                    add_piety = -250
                }

                scope:me_scope = {
                    #add_prestige = -1000
                    death = {
                        death_reason = death_poison 
                        killer = scope:my_rival
                    }
                }

                scope:my_rival = {
                    add_secret = {
                        type = secret_murder
                        target = scope:my_random_courtier
                    }
                }
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = {  #Hmmm...I Do Not Want To Drink This But I Must Know If It Poisoned Or Not. Courtier, You Drink Instead!
        name = friends_rivals_interactions_events.0003.c
        custom_tooltip = friends_rivals_interactions_events.0003.c.tooltip

        trigger = {
            is_alive = yes 
            OR = {
                has_trait = sadistic
                has_trait = callous
                has_trait = lunatic_1
                has_trait = possessed_1
                has_trait = craven
            }
        }

        random_living_character = { 
            limit = { OR = { has_character_flag = rival_interaction_flag } }
            save_scope_as = my_rival
        }

        ROOT = { 
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { is_alive = yes age > 15 is_courtier_of = scope:me_scope top_liege = scope:me_scope }
            save_scope_as = my_random_courtier
        }

        random_list = {

            0 = { #It Was Not Poisoned. But Now Your Courtier Despises You!
                scope:my_random_courtier = {
                    add_prestige = 100
                    add_opinion = {
                        target = scope:me_scope 
                        modifier = distrustful
                    }

                    add_opinion = {
                        target = scope:my_rival 
                        modifier = loyal_servant
                    }
                }

                scope:me_scope = {
                    add_prestige = -150
                    stress_impact = {
                        sadistic = medium_stress_impact_loss
                        callous = medium_stress_impact_loss
                        lunatic_1 = medium_stress_impact_loss
                        possessed_1 = medium_stress_impact_loss
                        craven = medium_stress_impact_loss
                    }
                }

                scope:my_rival = {
                    add_prestige = 100
                    add_opinion = {
                        target = scope:me_scope
                        modifier = laughingstock_opinion
                    }

                    add_opinion = {
                        target = scope:my_random_courtier 
                        modifier = befriended_opinion
                    }
                }

                scope:my_rival = {
                    remove_character_flag = rival_interaction_flag
                }
            }

            100 = { #The Wine Was Poisoned! Your Courtier Is Dead, But At Least You Are Alive...For Now!
                scope:my_random_courtier = {
                    death = {
                        death_reason = death_poison 
                        killer = scope:my_rival
                    }
                }

                scope:my_rival = {
                    add_secret = {
                        type = secret_murder
                        target = scope:my_random_courtier
                    }
                }


                scope:me_scope = {
                    add_prestige = -300
                    stress_impact = {
                        sadistic = medium_stress_impact_gain
                        callous = medium_stress_impact_gain
                        lunatic_1 = medium_stress_impact_gain
                        possessed_1 = medium_stress_impact_gain
                        craven = medium_stress_impact_gain
                    }
                }

                scope:my_rival = {
                    add_prestige = -100
                    add_trait = murderer
                    add_opinion = {
                        target = scope:me_scope 
                        modifier = bitter_rivalry_opinion
                    }
                }

                scope:my_rival = {
                    remove_character_flag = rival_interaction_flag
                }
            }
        }
    }
}

friends_rivals_interactions_events.0004 = {  #The Public Insult At The Feast About Your Lineage
    type = character_event
    title = friends_rivals_interactions_events.0004.t
    desc = friends_rivals_interactions_events.0004.desc

    theme = rival_relation
    override_background = {reference = feast }  

    left_portrait = { 
        character = ROOT 
        animation = stunned
    }
    right_portrait = { 
        character = scope:my_rival
        animation = toast_goblet
    }

    trigger = {
        is_alive = yes 
    }

    immediate = {
        random_living_character = {
            limit = {
                has_character_flag = rival_interaction_flag
            }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }
    }

    option = {  #You Do Not Rise To Their Level. You Let The Insult Pass
        name = friends_rivals_interactions_events.0004.a
        custom_tooltip = friends_rivals_interactions_events.0004.a.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = {
            limit = {
                has_character_flag = rival_interaction_flag
            }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = 100
            add_opinion = {
                target = scope:me_scope 
                modifier = laughingstock_opinion
            }
        }

        scope:me_scope = {
            add_prestige = -50
            stress_impact = {
                calm = medium_stress_impact_loss
                patient = major_stress_impact_loss
                temperate = major_stress_impact_loss
                arrogant = medium_stress_impact_gain
                vengeful = medium_stress_impact_gain
                brave = medium_stress_impact_gain
            }
        }

        every_living_character = {
            limit = { age > 16 is_courtier_of = scope:me_scope top_liege = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
            add_opinion = {
                target = scope:me_scope
                modifier = weak_excuses
            }

            add_opinion = {
                target = scope:my_rival 
                modifier = increased_opinion
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = {  #You Answer Back With A Quick Retort of Your Own...Which Is Not So Diplomatic
        name = friends_rivals_interactions_events.0004.b
        custom_tooltip = friends_rivals_interactions_events.0004.b.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = {
            limit = {
                has_character_flag = rival_interaction_flag
            }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = -100
            add_opinion = {
                target = scope:me_scope 
                modifier = bitter_rivalry_opinion
            }
        }

        scope:me_scope = {
            add_prestige = -100
            stress_impact = {
                calm = medium_stress_impact_gain
                patient = major_stress_impact_gain
                temperate = major_stress_impact_gain
                arrogant = medium_stress_impact_loss
                vengeful = medium_stress_impact_loss
                brave = medium_stress_impact_loss
            }
        }

        every_living_character = {
            limit = { age > 16 is_courtier_of = scope:me_scope top_liege = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
            add_opinion = {
                target = scope:me_scope
                modifier = insulted_opinion
            }

            add_opinion = {
                target = scope:my_rival 
                modifier = insulted_opinion
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = {  #HOW DARE YOU SAY THAT TO ME! ARREST THAT VILLIAN!
        name = friends_rivals_interactions_events.0004.c
        custom_tooltip = friends_rivals_interactions_events.0004.c.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = vengeful
                has_trait = callous
                has_trait = arrogant
            }
        }

        random_living_character = {
            limit = {
                has_character_flag = rival_interaction_flag
            }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = -150
            add_opinion = {
                target = scope:me_scope 
                modifier = rejected_opinion
            }

            imprison_character_effect = {  
                TARGET = scope:my_rival
                IMPRISONER = scope:me_scope
            }
        }

        scope:me_scope = {
            add_prestige = -50
            stress_impact = {
                vengeful = major_stress_impact_loss
                callous = major_stress_impact_loss
                arrogant = major_stress_impact_loss
            }
            hidden_effect = { add_tyranny = 20 }
        }

        every_living_character = {
            limit = { age > 16 is_courtier_of = scope:me_scope top_liege = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } } 
            add_opinion = {
                target = scope:me_scope
                modifier = intrusive_liege_opinion
            }
            add_opinion = {
                target = scope:my_rival 
                modifier = increased_opinion
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = { #I know What You Are, But What Am I? You Outwit Your Rival!
        name = friends_rivals_interactions_events.0004.d
        custom_tooltip = friends_rivals_interactions_events.0004.d.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = intellect_good_1
                has_trait = intellect_good_2
                has_trait = intellect_good_3
                has_trait = shrewd
                has_trait = diplomat
                has_trait = august
            }
        }

        random_living_character = {
            limit = {
                has_character_flag = rival_interaction_flag
            }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = -200
            add_opinion = {
                target = scope:me_scope 
                modifier = shamed_me_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 200
            stress_impact = {
                intellect_good_1 = medium_stress_impact_loss
                intellect_good_2 = medium_stress_impact_loss
                intellect_good_3 = medium_stress_impact_loss
                shrewd = medium_stress_impact_loss
                diplomat = medium_stress_impact_loss
                august = medium_stress_impact_loss
            }
        }

        every_living_character = {
            limit = { age > 16 is_courtier_of = scope:me_scope top_liege = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
            add_opinion = {
                target = scope:me_scope 
                modifier = loyal_servant
            }

            add_opinion = {
                target = scope:my_rival 
                modifier = rejected_opinion
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }
}

friends_rivals_interactions_events.0005 = { #You Accuse Your Rival of Having An Affair With One Of Your Courtiers
    type = character_event
    title = friends_rivals_interactions_events.0005.t
    desc = friends_rivals_interactions_events.0005.desc


    theme = rival_relation
    override_background = {reference = throne_room_scope } 

    left_portrait = { 
        character = ROOT 
        animation = threatening
    }
    right_portrait = { 
        character = scope:my_rival
        animation = rage
    }

    trigger = {
        is_alive = yes 
    }

    immediate = {
        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { is_alive = yes age > 15 is_female = yes is_courtier_of = scope:me_scope top_liege = scope:me_scope NOT = { is_close_family_of = scope:me_scope } NOT = { is_spouse_of = scope:me_scope } }
            add_character_flag = my_rivals_lover_interaction_flag
            save_scope_as = my_rivals_lover
        }
    }

    option = { #You Accuse Through Hunches And Feelings, Nothing Concrete
        name = friends_rivals_interactions_events.0005.a
        custom_tooltip = friends_rivals_interactions_events.0005.a.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = my_rivals_lover_interaction_flag }
            save_scope_as = my_rivals_lover
        }

        random_list = {

            75 = {  #Feelings and hunches are not evidence. The accusation is unconvincing
                scope:my_rival = {
                    add_prestige = 150
                    add_opinion = {
                        target = scope:me_scope
                        modifier = doubted_me
                    }
                }

                scope:me_scope = {
                    add_prestige = -150
                    stress_impact = {
                        zealous = medium_stress_impact_gain
                        honest = major_stress_impact_gain
                        just = major_stress_impact_gain
                        lustful = medium_stress_impact_loss
                        callous = medium_stress_impact_loss
                        deceitful = medium_stress_impact_loss
                        arbitrary = medium_stress_impact_loss
                    }
                }

                scope:my_rivals_lover = {
                    add_opinion = {
                        target = scope:me_scope 
                        modifier = doubted_me
                    }

                    add_opinion = {
                        target = scope:my_rival 
                        modifier = befriended_opinion
                    }
                }

                every_living_character = {
                    limit = { age > 15 is_courtier_of = scope:me_scope top_liege = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
                    add_opinion = {
                        target = scope:me_scope 
                        modifier = heard_bad_rumours_opinion
                    }

                    add_opinion = {
                        target = scope:my_rival 
                        modifier = increased_opinion
                    }
                }
                scope:my_rival = {
                    remove_character_flag = rival_interaction_flag
                }

                scope:my_rivals_lover = {
                    remove_character_flag = my_rivals_lover_interaction_flag
                }
            }
        
            25 = {  #Feelings and hunches are not evidence, but the accusations drove honesty into their souls. They were true!
                scope:my_rival = {
                    add_prestige = -150
                    if = {
                        limit = { is_married = yes }
                        add_trait = adulterer
                    }
                    else = {
                        add_trait = fornicator
                    }
                    hidden_effect = { set_relation_lover = scope:my_rivals_lover }
                    add_opinion = {
                        target = scope:me_scope 
                        modifier = bitter_rivalry_opinion
                    }
                    every_living_character = {
                        limit = { age > 15 is_courtier_of = scope:me_scope top_liege = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
                        add_opinion = {
                            target = scope:my_rival
                            modifier = rejected_opinion
                        }
                        add_opinion = {
                            target = scope:my_rivals_lover
                            modifier = rejected_opinion
                        }
                        add_opinion = {
                            target = scope:me_scope
                            modifier = loyal_servant
                        }
                    }
                }

                scope:me_scope = {
                    add_prestige = 150
                    stress_impact = {
                        zealous = medium_stress_impact_gain
                        just = major_stress_impact_gain
                        honest = major_stress_impact_gain
                        lustful = medium_stress_impact_loss
                        callous = medium_stress_impact_loss
                        deceitful = medium_stress_impact_loss
                        arbitrary = medium_stress_impact_loss
                    }
                }

                scope:my_rivals_lover = {
                    add_prestige = -250
                    add_piety = -250
                    add_opinion = {
                        target = scope:me_scope
                        modifier = shamed_me_opinion
                    }
                    if = {
                        limit = { is_married = yes }
                        add_trait = adulterer
                    }
                    else = {
                        add_trait = fornicator
                    }
                    hidden_effect = { set_relation_lover = scope:my_rival }
                }

                scope:my_rival = {
                    remove_character_flag = rival_interaction_flag
                }

                scope:my_rivals_lover = {
                    remove_character_flag = my_rivals_lover_interaction_flag
                }
            }
        }
    }

    option = { #You play the judge and jury. You accuse your rival and condemn him in the same breath
        name = friends_rivals_interactions_events.0005.b
        custom_tooltip = friends_rivals_interactions_events.0005.b.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = vengeful
                has_trait = callous
                has_trait = deceitful
                has_trait = arbitrary
            }
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = my_rivals_lover_interaction_flag }
            save_scope_as = my_rivals_lover
        }

        random_list = {

            85 = {  #Your rival's reputation is besmirched, but your accusations and condemnations are not truly convincing.
                scope:my_rival = {
                    add_prestige = -50
                    add_opinion = {
                        target = scope:me_scope
                        modifier = doubted_me
                    }
                }

                scope:me_scope = {
                    add_prestige = -150
                    add_piety = -150
                    stress_impact = {
                        calm = major_stress_impact_gain
                        patient = major_stress_impact_gain
                        humble = major_stress_impact_gain
                        lustful = major_stress_impact_loss
                        callous = major_stress_impact_loss
                        deceitful = major_stress_impact_loss
                        arbitrary = major_stress_impact_loss
                    }
                }

                scope:my_rivals_lover = {
                    add_prestige = -250
                    add_piety = 300
                    add_opinion = {
                        target = scope:me_scope 
                        modifier = doubted_me
                    }

                    add_opinion = {
                        target = scope:my_rival 
                        modifier = befriended_opinion
                    }
                }

                every_living_character = {
                    limit = { age > 15 is_courtier_of = scope:me_scope top_liege = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
                    add_opinion = {
                        target = scope:me_scope 
                        modifier = heard_bad_rumours_opinion
                    }

                    add_opinion = {
                        target = scope:my_rival 
                        modifier = increased_opinion
                    }
                }

                scope:my_rival = {
                    remove_character_flag = rival_interaction_flag
                }

                scope:my_rivals_lover = {
                    remove_character_flag = my_rivals_lover_interaction_flag
                }
            }

            15 = { #Despite having no evidence, your trickery and gile forces out a confession of adultery from the pair
                scope:my_rival = {
                    add_prestige = -150
                    if = {
                        limit = { is_married = yes }
                        add_trait = adulterer
                    }
                    else = {
                        add_trait = fornicator
                    }
                    hidden_effect = { set_relation_lover = scope:my_rivals_lover }
                    add_opinion = {
                        target = scope:me_scope 
                        modifier = bitter_rivalry_opinion
                    }
                    every_living_character = {
                        limit = { age > 15 is_courtier_of = scope:me_scope top_liege = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
                        add_opinion = {
                            target = scope:my_rival
                            modifier = rejected_opinion
                        }
                        add_opinion = {
                            target = scope:my_rivals_lover
                            modifier = rejected_opinion
                        }
                        add_opinion = {
                            target = scope:me_scope
                            modifier = loyal_servant
                        }
                    }
                }

                scope:me_scope = {
                    add_prestige = 150
                    stress_impact = {
                        calm = medium_stress_impact_gain
                        patient = major_stress_impact_gain
                        humble = major_stress_impact_gain
                        lustful = medium_stress_impact_loss
                        callous = major_stress_impact_loss
                        deceitful = major_stress_impact_loss
                        arbitrary = major_stress_impact_loss
                    }
                }

                scope:my_rivals_lover = {
                    add_prestige = -250
                    add_piety = -250
                    add_opinion = {
                        target = scope:me_scope
                        modifier = shamed_me_opinion
                    }
                    if = {
                        limit = { is_married = yes }
                        add_trait = adulterer
                    }
                    else = {
                        add_trait = fornicator
                    }
                    hidden_effect = { set_relation_lover = scope:my_rival }
                }

                scope:my_rival = {
                    remove_character_flag = rival_interaction_flag
                }

                scope:my_rivals_lover = {
                    remove_character_flag = my_rivals_lover_interaction_flag
                }
            }
        }
    }

    option = {  #You have not come unprepared, nor are you without justice. You use your evidence and righteous word against them
        name = friends_rivals_interactions_events.0005.c
        custom_tooltip = friends_rivals_interactions_events.0005.c.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = just
                has_trait = diligent
                has_trait = honest
                has_trait = zealous
            }
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        
        random_living_character = {
            limit = { has_character_flag = my_rivals_lover_interaction_flag }
            save_scope_as = my_rivals_lover
        }

        random_list = {

            15 = { #Even with all of your evidence and honesty, they do not confess!
                scope:my_rival = {
                    add_prestige = -50
                    add_opinion = {
                        target = scope:me_scope
                        modifier = doubted_me
                    }
                }

                scope:me_scope = {
                    add_prestige = -150
                    add_piety = -150
                    stress_impact = {
                        diligent = minor_stress_impact_loss
                        just = minor_stress_impact_loss
                        honest = minor_stress_impact_loss
                        lustful = major_stress_impact_gain
                        callous = major_stress_impact_gain
                        deceitful = major_stress_impact_gain
                        arbitrary = major_stress_impact_gain
                    }
                }

                scope:my_rivals_lover = {
                    add_prestige = -250
                    add_piety = 250
                    add_opinion = {
                        target = scope:me_scope 
                        modifier = doubted_me
                    }

                    add_opinion = {
                        target = scope:my_rival 
                        modifier = befriended_opinion
                    }
                }

                every_living_character = {
                    limit = { age > 15 is_courtier_of = scope:me_scope top_liege = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
                    add_opinion = {
                        target = scope:me_scope 
                        modifier = heard_bad_rumours_opinion
                    }

                    add_opinion = {
                        target = scope:my_rival 
                        modifier = increased_opinion
                    }
                }
                scope:my_rival = {
                    remove_character_flag = rival_interaction_flag
                }

                scope:my_rivals_lover = {
                    remove_character_flag = my_rivals_lover_interaction_flag
                }
            }


            85 = {  #The truth and justice behind your words compells them to confess their sin before the whole court
                scope:my_rival = {
                    add_prestige = -150
                    add_piety = -150
                    if = {
                        limit = { is_married = yes }
                        add_trait = adulterer
                    }
                    else = {
                        add_trait = fornicator
                    }
                    hidden_effect = { set_relation_lover = scope:my_rivals_lover }
                    add_opinion = {
                        target = scope:me_scope 
                        modifier = bitter_rivalry_opinion
                    }
                    every_living_character = {
                        limit = { age > 15 is_courtier_of = scope:me_scope top_liege = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope }}
                        add_opinion = {
                            target = scope:my_rival
                            modifier = rejected_opinion
                        }
                        add_opinion = {
                            target = scope:my_rivals_lover
                            modifier = rejected_opinion
                        }
                        add_opinion = {
                            target = scope:me_scope
                            modifier = loyal_servant
                        }
                    }
                }

                scope:me_scope = {
                    add_prestige = 150
                    add_piety = 150
                    stress_impact = {
                        zealous = medium_stress_impact_loss
                        diligent = major_stress_impact_loss
                        just = major_stress_impact_loss
                        lustful = medium_stress_impact_gain
                        callous = major_stress_impact_gain
                        deceitful = major_stress_impact_gain
                        arbitrary = major_stress_impact_gain
                    }
                }

                scope:my_rivals_lover = {
                    add_prestige = -250
                    add_piety = -250
                    add_opinion = {
                        target = scope:me_scope
                        modifier = shamed_me_opinion
                    }
                    if = {
                        limit = { is_married = yes }
                        add_trait = adulterer
                    }
                    else = {
                        add_trait = fornicator
                    }
                    hidden_effect = { set_relation_lover = scope:my_rival }
                }

                scope:my_rival = {
                    remove_character_flag = rival_interaction_flag
                }

                scope:my_rivals_lover = {
                    remove_character_flag = my_rivals_lover_interaction_flag
                }
            }
        }
    }
}

friends_rivals_interactions_events.0006 = {  #Border Despute 
    type = character_event
    title = friends_rivals_interactions_events.0006.t
    desc = friends_rivals_interactions_events.0006.desc

    theme = rival_relation
    override_background = {reference = throne_room_scope }  

    left_portrait = { 
        character = ROOT 
        animation = thinking
    }

    right_portrait = { 
        character = scope:my_rival
        animation = paranoia
    }

    trigger = {
        is_alive = yes 
    }

    immediate = {
        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }
    }

    option = {  #You Show Reason And Virtue, And Side With Your Rival In The Dispute
        name = friends_rivals_interactions_events.0006.a
        custom_tooltip = friends_rivals_interactions_events.0006.a.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = 150
            add_opinion = {
                target = scope:me_scope
                modifier = defused_feud_escalation_opinion
            }
        }

        scope:me_scope = {
            add_prestige = -100
            stress_impact = {
                calm = medium_stress_impact_loss
                patient = medium_stress_impact_loss
                humble = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                callous = medium_stress_impact_gain
                deceitful = medium_stress_impact_gain
                arbitrary = medium_stress_impact_gain
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = {  #You By All Rights Take The Side Of The Minor Landlord...Even If He Is Clearly In The Wrong 
        name = friends_rivals_interactions_events.0006.b
        custom_tooltip = friends_rivals_interactions_events.0006.b.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = -150
            add_opinion = {
                target = scope:me_scope
                modifier = rival_insult_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 150
            add_piety = -150
            stress_impact = {
                calm = medium_stress_impact_gain
                patient = medium_stress_impact_gain
                humble = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                callous = medium_stress_impact_loss
                deceitful = medium_stress_impact_loss
                arbitrary = medium_stress_impact_loss
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = {  #Justice Must Reign Supreme! You Punish The Deceptive Landlord...Much To The Surprise Of Your Rival. (Potential Rival-Ending Outcome)
        name = friends_rivals_interactions_events.0006.c
        custom_tooltip = friends_rivals_interactions_events.0006.c.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = just
                has_trait = zealous
                has_trait = paragon
            }
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = 100
            add_opinion = {
                target = scope:me_scope
                modifier = helped_me_in_time_of_need
            }
        }

        scope:me_scope = {
            add_prestige = 150
            add_piety = 150
            stress_impact = {
                just = medium_stress_impact_loss
                zealous = medium_stress_impact_loss
                paragon = medium_stress_impact_loss
                arrogant = major_stress_impact_gain
                callous = major_stress_impact_gain
                deceitful = major_stress_impact_gain
                arbitrary = major_stress_impact_gain
            }
        }

        random_list = {

            70 = {
                scope:me_scope = {
                    remove_relation_rival = scope:my_rival
                }
            }

            30 = {
                scope:me_scope = {
                    add_piety = 500
                }
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = {  #I Think I Will Just Confiscate All Of The Property
        name = friends_rivals_interactions_events.0006.d
        custom_tooltip = friends_rivals_interactions_events.0006.d.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = lunatic_1
                has_trait = arbitrary
            }
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = -250
            remove_short_term_gold = 250
            add_opinion = {
                target = scope:me_scope
                modifier = rejected_opinion
            }
        }

        scope:me_scope = {
            add_gold = 300
            add_prestige = -300
            add_piety = -300

            add_tyranny = 20
            stress_impact = {
                just = major_stress_impact_gain
                zealous = major_stress_impact_gain
                just = major_stress_impact_gain
                lunatic_1 = major_stress_impact_loss
                arbitrary = major_stress_impact_loss
            }
        }
    }
}

friends_rivals_interactions_events.0007 = {  #An Old Oath Now Under Question
    title = friends_rivals_interactions_events.0007.t
    desc = friends_rivals_interactions_events.0007.desc
    type = character_event

    theme = rival_relation
    override_background = {reference = throne_room_scope }  

    left_portrait = { 
        character = ROOT 
        animation = anger
    }

    right_portrait = { 
        character = scope:my_rival
        animation = anger
    }

    trigger = {
        is_alive = yes 
    }

    immediate = {
        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }
    }

    option = {  #You Take The Measured Approach And Take Half The Of The Golden Oath
        name = friends_rivals_interactions_events.0007.a
        custom_tooltip = friends_rivals_interactions_events.0007.a.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = 100
            remove_short_term_gold = 100

            add_opinion = {
                target = scope:me_scope 
                modifier = ignored_concerns
            }
        }

        scope:me_scope = {
            add_prestige = 100
            remove_short_term_gold = 100

            stress_impact = {
                calm = medium_stress_impact_loss
                patient = medium_stress_impact_loss
                humble = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                callous = medium_stress_impact_gain
                greedy = medium_stress_impact_gain
                arbitrary = medium_stress_impact_gain
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = {  #This was an oath. You will be paid in full or else there will be consequences
        name = friends_rivals_interactions_events.0007.c
        custom_tooltip = friends_rivals_interactions_events.0007.c.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = -200
            random_list = {
                50 = { #He Pays
                    remove_short_term_gold = 200 
                    add_opinion = {
                        target = scope:me_scope 
                        modifier = bitter_rivalry_opinion
                    }

                    scope:me_scope = {
                        add_gold = 200
                    }
                }

                50 = { #He Walks Out, Despises You, And Will Seek Your Throne!
                    add_pressed_claim = scope:me_scope.primary_title
                    add_opinion = { 
                        target = scope:me_scope 
                        modifier = rejected_opinion
                    }
                }
            }
        }

        scope:me_scope = {
            add_prestige = 200
            stress_impact = {
                calm = medium_stress_impact_gain
                patient = medium_stress_impact_gain
                humble = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                callous = medium_stress_impact_loss
                greedy = medium_stress_impact_loss
                arbitrary = medium_stress_impact_loss
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = { #You Let the Golden Oath Go, And Win Over The Hearts Of All Onlookers
        name = friends_rivals_interactions_events.0007.b
        custom_tooltip = friends_rivals_interactions_events.0007.b.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = compassionate
                has_trait = forgiving
                has_trait = humble
            }
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = 200

            add_opinion = {
                target = scope:me_scope 
                modifier = defused_feud_escalation_opinion
            }
        }

        scope:me_scope = {
            add_prestige = -150
            add_piety = 150

            every_living_character = {
                limit = { age > 15 is_courtier_of = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
                add_opinion = {
                    target = scope:me_scope 
                    modifier = pacified_opinion
                }
            }

            stress_impact = {
                compassionate = major_stress_impact_loss
                forgiving = major_stress_impact_loss
                humble = major_stress_impact_loss
                arrogant = medium_stress_impact_gain
                callous = medium_stress_impact_gain
                greedy = medium_stress_impact_gain
                arbitrary = medium_stress_impact_gain
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = {  #You will give me double the Golden Oath now, or else you will regret it for the rest of your miserable, short life!
        name = friends_rivals_interactions_events.0007.d
        custom_tooltip = friends_rivals_interactions_events.0007.d.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = greedy
            }
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = -400

            add_opinion = {
                target = scope:me_scope 
                modifier = debug_hates_liege_opinion
            }

            random_list = {
                50 = { #He Pays
                    remove_short_term_gold = 400
                    scope:me_scope = {
                        add_gold = 400
                    }
                }

                50 = { #He Refuses To Pay...So You Imprison Him!
                    scope:me_scope = {
                        imprison_character_effect = {
                            TARGET = scope:my_rival
                            IMPRISONER = scope:me_scope
                        }
                        add_tyranny = 20

                        every_living_character = {
                            limit = { age > 15 is_courtier_of = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
                            add_opinion = {
                                target = scope:me_scope 
                                modifier = threatened_opinion
                            }
                        }
                    }
                }
            }
        }

        scope:me_scope = {
            add_prestige = 400
            add_piety = -400
            stress_impact = {
                greedy = major_stress_impact_loss
                callous = medium_stress_impact_loss
                arbitrary = medium_stress_impact_loss
                calm = major_stress_impact_gain
                patient = major_stress_impact_gain
                humble = major_stress_impact_gain
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }
}

friends_rivals_interactions_events.0008 = {  #The Duel!
    title = friends_rivals_interactions_events.0008.t
    desc = friends_rivals_interactions_events.0008.desc
    type = character_event

    theme = rival_relation
    override_background = {reference = throne_room_scope }


    left_portrait = { 
        character = ROOT 
        animation = shock
    }

    right_portrait = { 
        character = scope:my_rival
        animation = aggressive_sword
    }

    trigger = {
        is_alive = yes 
    }

    immediate = {
        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }
    }

    option = { #You're On!
        name = friends_rivals_interactions_events.0008.a
        custom_tooltip = friends_rivals_interactions_events.0008.a.tooltip

        trigger = {
            is_alive = yes 
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
            save_scope_as = duel_attacker
        }

        ROOT = {
            save_scope_as = me_scope
            save_scope_as = duel_defender
        }

        configure_start_single_combat_effect = {
			SC_INITIATOR = scope:duel_attacker
			SC_ATTACKER = scope:duel_attacker
			SC_DEFENDER = scope:duel_defender
			FATALITY = always
			FIXED = no
			LOCALE = terrain_scope
			OUTPUT_EVENT = perk_interaction.0101
			INVALIDATION_EVENT = perk_interaction.0102   #single_combat.1006
		}

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = { #Is Your Rival Foolish? Why Would You Fight On His Terms? You Respond With A Resounding No!
        name = friends_rivals_interactions_events.0008.b
        custom_tooltip = friends_rivals_interactions_events.0008.b.tooltip

        trigger = {
            is_alive = yes 
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = 150
            add_opinion = {
                target = scope:me_scope
                modifier = bitter_rivalry_opinion
            }
        }

        scope:me_scope = {
            add_prestige = -150
            add_piety = 150
            stress_impact = {
                calm = medium_stress_impact_loss
                patient = medium_stress_impact_loss
                humble = medium_stress_impact_loss
                craven = major_stress_impact_loss
                arrogant = medium_stress_impact_gain
                callous = medium_stress_impact_gain
                brave = major_stress_impact_gain
                arbitrary = medium_stress_impact_gain
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = { #I am a women...Are you dumb?
        name = friends_rivals_interactions_events.0008.c
        custom_tooltip = friends_rivals_interactions_events.0008.c.tooltip

        trigger = {
            is_alive = yes
            is_female = yes
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = -150
            add_opinion = {
                target = scope:me_scope
                modifier = bitter_rivalry_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 150
            stress_impact = {
                calm = medium_stress_impact_loss
                patient = medium_stress_impact_loss
                humble = medium_stress_impact_loss
                intellect_good_1 = major_stress_impact_loss
                intellect_good_2 = major_stress_impact_loss
                intellect_good_3 = major_stress_impact_loss
                arrogant = medium_stress_impact_gain
                callous = medium_stress_impact_gain
                brave = major_stress_impact_gain
                arbitrary = medium_stress_impact_gain
            }
        }

        every_living_character = {
            limit = { age > 15 is_courtier_of = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
            add_opinion = {
                target = scope:my_rival 
                modifier = publicly_ridiculed
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = {  #Violence Solves Nothing. Let Us Discuss This Like Civilized People
        name = friends_rivals_interactions_events.0008.d
        custom_tooltip = friends_rivals_interactions_events.0008.d.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = calm
                has_trait = patient
                has_trait = humble
            }
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = 100

            random_list = {
                50 = { #Your rival agrees to Talk, And You Both Resolve Your Issues Like Civilized People
                    scope:my_rival = {
                        add_opinion = {
                            target = scope:me_scope 
                            modifier = defused_feud_escalation_opinion
                        }
                    }
                }

                50 = {  #You agree to stop being rivals!
                    remove_relation_rival = scope:my_rival
                }
            }
        }

        scope:me_scope = {
            add_prestige = 150
            add_piety = 150
            stress_impact = {
                calm = major_stress_impact_loss
                patient = major_stress_impact_loss
                humble = major_stress_impact_loss
                shrewd = medium_stress_impact_loss
                arrogant = major_stress_impact_gain
                callous = major_stress_impact_gain
                deceitful = medium_stress_impact_gain
                arbitrary = medium_stress_impact_gain
            } 
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }
}

friends_rivals_interactions_events.0009 = {  #The Missing, Ancient Heirloom!
    title = friends_rivals_interactions_events.0009.t
    desc = friends_rivals_interactions_events.0009.desc
    type = character_event

    theme = rival_relation
    override_background = {reference = council_chamber }  

    left_portrait = { 
        character = ROOT 
        animation = anger
    }

    right_portrait = { 
        character = scope:my_rival
        animation = personality_cynical
    }

    trigger = {
        is_alive = yes 
    }

    immediate = {
        random_living_character = { 
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }
    }

    option = {  #You Show Restrait And Do NOT Accuse Your Rival Of Stealing The Heirloom...Even If You Know They Did It!
        name = friends_rivals_interactions_events.0009.a
        custom_tooltip = friends_rivals_interactions_events.0009.a.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = 150
            add_opinion = {
                target = scope:me_scope 
                modifier = defused_feud_escalation_opinion
            }
        }

        scope:me_scope = {
            add_prestige = -150
            add_piety = 150
            stress_impact = {
                calm = medium_stress_impact_loss
                patient = medium_stress_impact_loss
                humble = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                impatient = medium_stress_impact_gain
                deceitful = medium_stress_impact_gain
                arbitrary = medium_stress_impact_gain
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = {  #You Accuse Your Rival Of Stealing...Though, You Have No Proof? Will It Be Convincing For Them To Confess?
        name = friends_rivals_interactions_events.0009.b
        custom_tooltip = friends_rivals_interactions_events.0009.b.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_list = {
            50 = { #Your Rival Confesses!
                scope:my_rival = {
                    add_prestige = -200
                    add_piety = -200
                    add_opinion = {
                        target = scope:me_scope 
                        modifier = bitter_rivalry_opinion
                    }
                }
                 scope:me_scope = {
                    add_prestige = 100
                    add_piety = -100
                    stress_impact = {
                        calm = medium_stress_impact_loss
                        patient = medium_stress_impact_loss
                        humble = medium_stress_impact_loss
                        arrogant = medium_stress_impact_gain
                        impatient = medium_stress_impact_gain
                        deceitful = medium_stress_impact_gain
                        arbitrary = medium_stress_impact_gain
                    }
                }
            }

            50 = {  #Your Rival Denies It, And You Look Like A Fool For Accusing Them With No Proof!
                scope:my_rival = {
                    add_prestige = 100
                    add_opinion = {
                        target = scope:me_scope 
                        modifier = rival_insult_opinion
                    }
                }

                scope:me_scope = {
                    add_prestige = -100
                    add_piety = -100
                    stress_impact = {
                        calm = medium_stress_impact_gain
                        patient = medium_stress_impact_gain
                        humble = medium_stress_impact_gain
                        arrogant = medium_stress_impact_loss
                        impatient = medium_stress_impact_loss
                        deceitful = medium_stress_impact_loss
                        arbitrary = medium_stress_impact_loss
                    }
                }
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = { #You forgive whomever took the heirloom, Because It's Just An Object After All!
        name = friends_rivals_interactions_events.0009.c
        custom_tooltip = friends_rivals_interactions_events.0009.c.tooltip

        trigger = {
            is_alive = yes 
            OR = {
                has_trait = forgiving
                has_trait = patient
                has_trait = humble
            }
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = 150
            add_opinion = {
                target = scope:me_scope 
                modifier = defused_feud_escalation_opinion
            }
        }

        scope:me_scope = {
            add_prestige = -150
            add_piety = 150
            stress_impact = {
                forgiving = major_stress_impact_loss
                patient = medium_stress_impact_loss
                humble = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                impatient = medium_stress_impact_gain
                deceitful = medium_stress_impact_gain
                arbitrary = medium_stress_impact_gain
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = {  #You condemn your rival regardless!
        name = friends_rivals_interactions_events.0009.d
        custom_tooltip = friends_rivals_interactions_events.0009.d.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = possessed_1
                has_trait = vengeful
                has_trait = sadistic
            }
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = -150
            add_opinion = {
                target = scope:me_scope 
                modifier = bitter_rivalry_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 150
            add_piety = -150
            stress_impact = {
                possessed_1 = medium_stress_impact_loss
                vengeful = medium_stress_impact_loss
                sadistic = medium_stress_impact_loss
                forgiving = medium_stress_impact_gain
                patient = medium_stress_impact_gain
                humble = medium_stress_impact_gain
                arbitrary = medium_stress_impact_gain
            }

            imprison_character_effect = {  
                TARGET = scope:my_rival
                IMPRISONER = scope:me_scope
            }
        }
    }

    option = {  #You may not get your heirloom back, but at least you have vassals to tax for its worth's return
        name = friends_rivals_interactions_events.0009.e
        custom_tooltip = friends_rivals_interactions_events.0009.e.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = greedy
            }
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = -100
            remove_short_term_gold = 100
            add_opinion = {
                target = scope:me_scope 
                modifier = rival_insult_opinion
            }
        }

        scope:me_scope = {
            add_prestige = -100
            add_piety = -100
            add_gold = 300
            stress_impact = {
                greedy = medium_stress_impact_loss
                callous = medium_stress_impact_loss
                arbitrary = medium_stress_impact_loss
                calm = medium_stress_impact_gain
                patient = medium_stress_impact_gain
                humble = medium_stress_impact_gain
            }
        }

        every_living_character = {
            limit = { age > 15 liege = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
            add_opinion = {
                target = scope:my_rival 
                modifier = intrusive_liege_opinion
            }
            remove_short_term_gold = 50
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }
}

friends_rivals_interactions_events.0010 = {  #Rival is spreading rumors about your piety
    title = friends_rivals_interactions_events.0010.t
    desc = friends_rivals_interactions_events.0010.desc
    type = character_event

    theme = rival_relation
    override_background = {reference = corridor_night }  

    left_portrait = { 
        character = ROOT 
        animation = anger
    }

    right_portrait = { 
        character = scope:my_rival
        animation = personality_dishonorable
    }

    trigger = {
        is_alive = yes 
    }

    immediate = {
        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }
    }

    option = {  #Be magnanimous...and obviously make a grand show of your piety
        name = friends_rivals_interactions_events.0010.a
        custom_tooltip = friends_rivals_interactions_events.0010.a.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = 150
            add_opinion = {
                target = scope:me_scope 
                modifier = weak_excuses
            }
        }

        scope:me_scope = {
            add_prestige = 100
            add_piety = 5
            stress_impact = {
                arrogant = medium_stress_impact_loss
                ambitious = medium_stress_impact_loss
                brave = medium_stress_impact_loss
                humble = medium_stress_impact_gain
                zealous = medium_stress_impact_gain
                paragon = medium_stress_impact_gain
                compassionate = medium_stress_impact_gain
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = {  #You will not suffer such insults! Your spread equally false (or maybe unironically true) rumors about your rival's piety!
        name = friends_rivals_interactions_events.0010.b
        custom_tooltip = friends_rivals_interactions_events.0010.b.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_piety = -150
            add_opinion = {
                target = scope:me_scope 
                modifier = rival_insult_opinion
            }
        }

        scope:me_scope = {
            add_piety = -150
            add_prestige = 50
            stress_impact = {
                arrogant = medium_stress_impact_loss
                ambitious = medium_stress_impact_loss
                brave = medium_stress_impact_loss
                humble = medium_stress_impact_gain
                zealous = medium_stress_impact_gain
                paragon = medium_stress_impact_gain
                compassionate = medium_stress_impact_gain
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = {  #You are tremendously religious, and so you show your faith rather than boast of it
        name = friends_rivals_interactions_events.0010.c
        custom_tooltip = friends_rivals_interactions_events.0010.c.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = zealous
                has_trait = paragon
            }
            
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_piety = -150
            add_opinion = {
                target = scope:me_scope 
                modifier = rival_insult_opinion
            }
        }

        scope:me_scope = {
            add_piety = 150
            add_prestige = 50
            stress_impact = {
                arrogant = medium_stress_impact_gain
                ambitious = medium_stress_impact_gain
                brave = medium_stress_impact_gain
                humble = medium_stress_impact_loss
                zealous = medium_stress_impact_loss
                paragon = medium_stress_impact_loss
                compassionate = medium_stress_impact_loss
            }
        }

        every_living_character = {
            limit = { age > 15 liege = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
            add_opinion = {
                target = scope:me_scope
                modifier = trusting_liege_opinion
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = {  #Good. I want to be feared and thought of as little more than a devil incarnate
        name = friends_rivals_interactions_events.0010.d
        custom_tooltip = friends_rivals_interactions_events.0010.d.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = possessed_1
                has_trait = vengeful
                has_trait = sadistic
            }
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = -150
            add_opinion = {
                target = scope:me_scope 
                modifier = rival_insult_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 250
            add_piety = -250
            stress_impact = {
                possessed_1 = medium_stress_impact_loss
                vengeful = medium_stress_impact_loss
                sadistic = medium_stress_impact_loss
                forgiving = medium_stress_impact_gain
                patient = medium_stress_impact_gain
                humble = medium_stress_impact_gain
                paragon = medium_stress_impact_gain
            }
        }

        every_living_character = {
            limit = { age > 15 liege = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
            add_opinion = {
                target = scope:my_rival
                modifier = intrusive_liege_opinion
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }
}

friends_rivals_interactions_events.0011 = {  #Marriage Sabotage!
    title = friends_rivals_interactions_events.0011.t
    desc = friends_rivals_interactions_events.0011.desc
    type = character_event

    theme = rival_relation
    override_background = {reference = throne_room_scope }  

    left_portrait = { 
        character = ROOT 
        animation = personality_compassionate
    }

    right_portrait = { 
        character = scope:my_rival
        animation = laugh
    }

    immediate = {
        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { age > 15 age < 41 is_courtier_of = scope:me_scope is_married = no is_female = no NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
            add_character_flag = groom_interaction_flag
            save_scope_as = groom
        }

        random_living_character = {
            limit = { age > 15 age < 41 is_courtier_of = scope:me_scope is_married = no is_female = yes NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
            add_character_flag = bride_interaction_flag
            save_scope_as = bride
        }
    }

    option = {  #You Smooth Over The Rumors And Save The Marriage...At Great Cost Of Your Prestige
        name = friends_rivals_interactions_events.0011.a
        custom_tooltip = friends_rivals_interactions_events.0011.a.tooltip

        trigger = { 
            is_alive = yes
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = groom_interaction_flag }
            save_scope_as = groom
        }

        random_living_character = {
            limit = { has_character_flag = bride_interaction_flag }
            save_scope_as = bride
        }

        scope:my_rival = {
            add_prestige = 150
            add_piety = -50
            add_opinion = {
                target = scope:me_scope 
                modifier = bitter_rivalry_opinion
            }
        }

        scope:groom = {
            add_prestige = 50
            add_opinion = {
                target = scope:me_scope 
                modifier = loyalty_opinion
            }
            add_opinion = {
                target = scope:my_rival 
                modifier = rival_insult_opinion
            }
            create_betrothal = scope:bride
        }

        scope:bride = {
            add_prestige = 50
            add_opinion = {
                target = scope:me_scope 
                modifier = loyalty_opinion
            }
            add_opinion = {
                target = scope:my_rival 
                modifier = rival_insult_opinion
            }
        }

        scope:me_scope = {
            add_prestige = -200
            add_piety = 50
            stress_impact = {
                calm = medium_stress_impact_loss
                patient = medium_stress_impact_loss
                humble = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                impatient = medium_stress_impact_gain
                callous = medium_stress_impact_gain
                arbitrary = medium_stress_impact_gain
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }

        scope:groom = {
            remove_character_flag = groom_interaction_flag
        }

        scope:bride = {
            remove_character_flag = bride_interaction_flag
        }
    }

    option = {  #You allow these rumors to fester, And the marriage falls apart...But at least you don't look like a fool for trying to save it!
        name = friends_rivals_interactions_events.0011.b
        custom_tooltip = friends_rivals_interactions_events.0011.b.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = groom_interaction_flag }
            save_scope_as = groom
        }

        random_living_character = {
            limit = { has_character_flag = bride_interaction_flag }
            save_scope_as = bride
        }

        scope:my_rival = {
            add_prestige = 150
            add_piety = -150
            add_opinion = {
                target = scope:me_scope 
                modifier = rival_insult_opinion
            }
        }

        scope:groom = {
            add_prestige = -50
            add_opinion = {
                target = scope:me_scope 
                modifier = rival_insult_opinion
            }
            add_opinion = {
                target = scope:bride
                modifier = rejected_opinion
            }
        }

        scope:bride = { 
            add_prestige = -50
            add_opinion = {
                target = scope:me_scope
                modifier = rival_insult_opinion
            }
            add_opinion = {
                target = scope:groom
                modifier = rejected_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 50
            add_piety = -150
            stress_impact = {
                calm = medium_stress_impact_gain
                zealous = medium_stress_impact_gain
                humble = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                impatient = medium_stress_impact_loss
                callous = medium_stress_impact_loss
                arbitrary = medium_stress_impact_loss
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }

        scope:groom = {
            remove_character_flag = groom_interaction_flag
        }

        scope:bride = {
            remove_character_flag = bride_interaction_flag
        }
    }

    option = {  #You will dispel these rumors with a single grand gesture of good will from the piety of your faith!
        name = friends_rivals_interactions_events.0011.c
        custom_tooltip = friends_rivals_interactions_events.0011.c.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = zealous
                has_trait = paragon
            }
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = groom_interaction_flag }
            save_scope_as = groom
        }

        random_living_character = {
            limit = { has_character_flag = bride_interaction_flag }
            save_scope_as = bride
        }

        scope:my_rival = {
            add_prestige = -150
            add_piety = -150
            add_opinion = {
                target = scope:me_scope 
                modifier = rival_insult_opinion
            }
        }

        scope:groom = {
            add_prestige = 50
            add_opinion = {
                target = scope:me_scope 
                modifier = helped_me_in_time_of_need
            }
            add_opinion = {
                target = scope:my_rival 
                modifier = rival_insult_opinion
            }
            create_betrothal = scope:bride
        }

        scope:bride = {
            add_prestige = 50
            add_opinion = {
                target = scope:me_scope 
                modifier = helped_me_in_time_of_need
            }
            add_opinion = {
                target = scope:my_rival 
                modifier = rival_insult_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 150
            add_piety = 150
            stress_impact = {
                zealous = medium_stress_impact_loss
                paragon = medium_stress_impact_loss
                compassionate = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                impatient = medium_stress_impact_gain
                callous = medium_stress_impact_gain
                arbitrary = medium_stress_impact_gain
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }

        scope:groom = {
            remove_character_flag = groom_interaction_flag
        }

        scope:bride = {
            remove_character_flag = bride_interaction_flag
        }
    }
}

friends_rivals_interactions_events.0012 = { #Your rival is spreading rumors about your fertility!
    title = friends_rivals_interactions_events.0012.t
    desc = friends_rivals_interactions_events.0012.desc
    type = character_event

    theme = rival_relation
    override_background = {reference = throne_room_scope }  

    left_portrait = { 
        character = ROOT 
        animation = shock
    }

    right_portrait = { 
        character = scope:my_rival
        animation = personality_callous
    }

    immediate = {
        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        random_living_character = { 
            limit = { OR = { mother = scope:me_scope father = scope:me_scope } }
            save_scope_as = my_child
        }
    }

    option = {  #You refuse to dignify such rumors with a response, Because You Are Above Such Insults...but now people think you are actually impotent
        name = friends_rivals_interactions_events.0012.a
        custom_tooltip = friends_rivals_interactions_events.0012.a.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }


        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = { 
            limit = { OR = { mother = scope:me_scope father = scope:me_scope } }
            save_scope_as = my_child
        }

        scope:my_rival = {
            add_prestige = 150
            add_opinion = {
                target = scope:me_scope 
                modifier = publicly_ridiculed
            }
        }

        every_living_character = {
            limit = { age > 15 is_courtier_of = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } } 
            add_opinion = {
                target = scope:me_scope
                modifier = publicly_ridiculed
            }
        }


        scope:me_scope = {
            add_prestige = -150
            add_piety = 150
            stress_impact = {
                calm = medium_stress_impact_loss
                patient = medium_stress_impact_loss
                chaste = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                impatient = medium_stress_impact_gain
                lustful = medium_stress_impact_gain
                arbitrary = medium_stress_impact_gain
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = {  #You come out against these rumors with a fury...which, is slightly more convicing
        name = friends_rivals_interactions_events.0012.b
        custom_tooltip = friends_rivals_interactions_events.0012.b

        trigger = {
            is_alive = yes
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        scope:my_rival = {
            add_prestige = 50
            add_opinion = {
                target = scope:me_scope 
                modifier = rival_insult_opinion
            }
        }

        every_living_character = {
            limit = { age > 15 is_courtier_of = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
            add_opinion = {
                target = scope:my_rival
                modifier = weak_excuses
            }
        }

        scope:me_scope = {
            add_prestige = 50
            add_piety = -50
            stress_impact = {
                calm = medium_stress_impact_gain
                patient = medium_stress_impact_gain
                chaste = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                impatient = medium_stress_impact_loss
                lustful = medium_stress_impact_loss
                arbitrary = medium_stress_impact_loss
            }
        }
    }

    option = {  #I am not impotent! See, I shall have a child just to prove it!  (MALE VERSION)
        name = friends_rivals_interactions_events.0012.c
        custom_tooltip = friends_rivals_interactions_events.0012.c.tooltip

        trigger = {
            is_alive = yes
            is_female = no
            OR = {
                has_trait = lustful
                has_trait = seducer
            }
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        random_living_character = { 
            limit = { age > 15 is_courtier_of = scope:me_scope is_female = yes is_married = no NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
            save_scope_as = lover
        }

        scope:my_rival = {
            add_prestige = -150
            add_opinion = {
                target = scope:me_scope 
                modifier = rival_insult_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 150
            add_piety = -150
            set_relation_lover = scope:lover
            stress_impact = {
                calm = medium_stress_impact_gain
                patient = medium_stress_impact_gain
                chaste = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                impatient = medium_stress_impact_loss
                lustful = medium_stress_impact_loss
                arbitrary = medium_stress_impact_loss
            }
        }


        every_living_character = {
            limit = { age > 15 is_courtier_of = scope:me_scope OR = { has_trait = just has_trait = chaste has_trait = zealous has_trait = compassionate has_trait = temperate } NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
            add_opinion = {
                target = scope:me_scope
                modifier = shamed_me_opinion
            }
        }

        every_living_character = {
            limit = { age > 15 is_courtier_of = scope:me_scope OR = { has_trait = lustful has_trait = seducer has_trait = cynical has_trait = callous has_trait = arbitrary has_trait = gluttonous } NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
            add_opinion = {
                target = scope:me_scope
                modifier = loyalty_opinion
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = {  #I am not impotent! See, I shall have a child just to prove it!  (FEMALE VERSION)
        name = friends_rivals_interactions_events.0012.d
        custom_tooltip = friends_rivals_interactions_events.0012.d.tooltip

        trigger = {
            is_alive = yes
            is_female = yes
            OR = {
                has_trait = lustful
                has_trait = seducer
            }
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        random_living_character = { 
            limit = { age > 15 is_courtier_of = scope:me_scope is_female = no is_married = no NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
            save_scope_as = lover
        }

        scope:my_rival = {
            add_prestige = -150
            add_opinion = {
                target = scope:me_scope 
                modifier = rival_insult_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 150
            add_piety = -150
            set_relation_lover = scope:lover
            stress_impact = {
                calm = medium_stress_impact_gain
                patient = medium_stress_impact_gain
                chaste = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                impatient = medium_stress_impact_loss
                lustful = medium_stress_impact_loss
                arbitrary = medium_stress_impact_loss
            }
        }


        every_living_character = {
            limit = { age > 15 is_courtier_of = scope:me_scope OR = { has_trait = just has_trait = chaste has_trait = zealous has_trait = compassionate has_trait = temperate } NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
            add_opinion = {
                target = scope:me_scope
                modifier = shamed_me_opinion
            }
        }

        every_living_character = {
            limit = { age > 15 is_courtier_of = scope:me_scope OR = { has_trait = lustful has_trait = seducer has_trait = cynical has_trait = callous has_trait = arbitrary has_trait = gluttonous } NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
            add_opinion = {
                target = scope:me_scope
                modifier = loyalty_opinion
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = { #Are you serious? I have kids!!
        name = friends_rivals_interactions_events.0012.e
        custom_tooltip = friends_rivals_interactions_events.0012.e.tooltip

        trigger = {
            is_alive = yes
            scope:my_child = {
                exists = yes
            }
            #FIGURE OUT RIGHT TRIGGER
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = { 
            limit = { OR = { mother = scope:me_scope father = scope:me_scope } }
            save_scope_as = my_child
        }

        scope:my_rival = {
            add_prestige = -150
            add_opinion = {
                target = scope:me_scope 
                modifier = rival_insult_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 150
            add_piety = -150
            stress_impact = {
                calm = medium_stress_impact_loss
                patient = medium_stress_impact_loss
                chaste = medium_stress_impact_loss
                arrogant = medium_stress_impact_loss
                impatient = medium_stress_impact_loss
                lustful = medium_stress_impact_loss
                arbitrary = medium_stress_impact_loss
            }
        }

        every_living_character = {
            limit = { age > 15 is_courtier_of = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
            add_opinion = {
                target = scope:my_rival
                modifier = laughingstock_opinion
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }
}

friends_rivals_interactions_events.0013 = {  #The local tournament misshap
    title = friends_rivals_interactions_events.0013.t
    desc = friends_rivals_interactions_events.0013.desc
    type = character_event

    theme = rival_relation
    override_background = {reference = terrain_activity }  

    left_portrait = { 
        character = ROOT 
        animation = stunned
    }

    right_portrait = { 
        character = scope:my_rival
        animation = random_weapon_aggressive
    }

    immediate = {
        ROOT = {
            save_scope_as = me_scope
        }
        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }
    }

    option = {  #You did that on purpose! You accuse your rival of sabotage and tell everyone...who does not really believe you
        name = friends_rivals_interactions_events.0013.a
        custom_tooltip = friends_rivals_interactions_events.0013.a.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = -150
            add_opinion = {
                target = scope:me_scope 
                modifier = rival_insult_opinion
            }
        }

        every_living_character = {
            limit = { age > 15 is_courtier_of = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
            add_opinion = {
                target = scope:my_rival
                modifier = laughingstock_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 150
            add_piety = -150
            stress_impact = {
                calm = medium_stress_impact_gain
                patient = medium_stress_impact_gain
                brave = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                impatient = medium_stress_impact_loss
                craven = medium_stress_impact_loss
                arbitrary = medium_stress_impact_loss
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = {  #You let it go, and the rumors die down...but now everyone thinks you are a clumsy fool
        name = friends_rivals_interactions_events.0013.b
        custom_tooltip = friends_rivals_interactions_events.0013.b.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = 150
            add_opinion = {
                target = scope:me_scope 
                modifier = rival_insult_opinion
            }
        }

        every_living_character = {
            limit = { age > 15 is_courtier_of = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
            add_opinion = {
                target = scope:me_scope
                modifier = laughingstock_opinion
            }
        }

        scope:me_scope = {
            add_prestige = -150
            add_piety = 150
            stress_impact = {
                calm = medium_stress_impact_loss
                patient = medium_stress_impact_loss
                brave = medium_stress_impact_gain
                arrogant = medium_stress_impact_gain
                impatient = medium_stress_impact_gain
                craven = medium_stress_impact_loss
                arbitrary = medium_stress_impact_gain
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = {  #You challenge your rival to a duel before everyone to defend your honor!
        name = friends_rivals_interactions_events.0013.c
        custom_tooltip = friends_rivals_interactions_events.0013.c.tooltip

        trigger = {
            is_alive = yes
            OR = { 
                has_trait = brave
                has_trait = arrogant
                has_trait = impatient
            }
        }

        random_living_character = { 
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
            save_scope_as = duel_defender
        }

        ROOT = {
            save_scope_as = me_scope
            save_scope_as = duel_attacker
        }

        scope:my_rival = {
            add_prestige = 150
            add_opinion = {
                target = scope:me_scope 
                modifier = rival_insult_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 150
            stress_impact = {
                craven = medium_stress_impact_gain
                patient = medium_stress_impact_gain
                chaste = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                impatient = medium_stress_impact_loss
                brave = medium_stress_impact_loss
                arbitrary = medium_stress_impact_loss
            }
        }

        configure_start_single_combat_effect = {
			SC_INITIATOR = scope:duel_attacker
			SC_ATTACKER = scope:duel_attacker
			SC_DEFENDER = scope:duel_defender
			FATALITY = always
			FIXED = no
			LOCALE = terrain_scope
			OUTPUT_EVENT = perk_interaction.0101
			INVALIDATION_EVENT = perk_interaction.0102   #single_combat.1006
		}

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = {  #You let the hit go and declare your rival the winner...breaking the icy bond between the two of you
        name = friends_rivals_interactions_events.0013.d
        custom_tooltip = friends_rivals_interactions_events.0013.d.tooltip

        trigger = {
            is_alive = yes
            OR = { 
                has_trait = forgiving
                has_trait = patient
                has_trait = humble
            }
        }

        random_living_character = { 
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = 150
            add_opinion = {
                target = scope:me_scope 
                modifier = defused_feud_escalation_opinion
            }
        }

        every_living_character = {
            limit = { age > 15 is_courtier_of = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
            add_opinion = {
                target = scope:my_rival
                modifier = forgiven_opinion
            }
            add_opinion = {
                target = scope:me_scope
                modifier = forgiven_opinion
            }
        }

        scope:me_scope = {
            add_prestige = -150
            add_piety = 150
            remove_relation_rival = scope:my_rival
            stress_impact = {
                calm = medium_stress_impact_loss
                patient = medium_stress_impact_loss
                humble = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                impatient = medium_stress_impact_gain
                brave = medium_stress_impact_gain
                callous = medium_stress_impact_gain
            }
        }
    }
}

friends_rivals_interactions_events.0014 = { #The Spy!
    title = friends_rivals_interactions_events.0014.t
    desc = friends_rivals_interactions_events.0014.desc
    type = character_event

    theme = rival_relation
    override_background = {reference = dungeon }  

    left_portrait = { 
        character = ROOT 
        animation = disapproval
    }

    right_portrait = { 
        character = scope:my_rival
        animation = eavesdrop
    }

    immediate = {
        ROOT = {
            save_scope_as = me_scope
        }
        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }
        random_living_character = {
            limit = { age > 15 is_courtier_of = scope:me_scope NOT = { is_close_family_of = scope:me_scope } NOT = { is_spouse_of = scope:me_scope } }
            add_character_flag = spy_interaction_flag
            save_scope_as = the_spy
        }
    }

    option = {  #You will rot in my dungeon cell for this treachery! You imprison the spy and make an example out of them to your rival! 
        name = friends_rivals_interactions_events.0014.a
        custom_tooltip = friends_rivals_interactions_events.0014.a.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = { 
            limit = { has_character_flag = spy_interaction_flag }
            save_scope_as = the_spy
        }

        scope:my_rival = {
            add_prestige = 150
            add_opinion = {
                target = scope:me_scope 
                modifier = rival_insult_opinion
            }
        }

        scope:the_spy = {
            add_prestige = -150
            add_opinion = {
                target = scope:my_rival 
                modifier = rejected_opinion
            }
            add_opinion = {
                target = scope:me_scope 
                modifier = pretender_opinion
            }
            imprison_character_effect = {  
                TARGET = scope:the_spy
                IMPRISONER = scope:me_scope
            }
        }

        scope:me_scope = {
            add_prestige = 150
            add_piety = -150
            stress_impact = {
                calm = medium_stress_impact_gain
                patient = medium_stress_impact_gain
                forgiving = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                impatient = medium_stress_impact_loss
                vengeful = medium_stress_impact_loss
                arbitrary = medium_stress_impact_loss
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }

        scope:the_spy = {
            remove_character_flag = spy_interaction_flag
        }
    }

    option = {  #You let the spy go...but not before telling all of your rivals treachory
        name = friends_rivals_interactions_events.0014.b
        custom_tooltip = friends_rivals_interactions_events.0014.b.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = { 
            limit = { has_character_flag = spy_interaction_flag }
            save_scope_as = the_spy
        }

        scope:my_rival = {
            add_prestige = -150
            add_opinion = {
                target = scope:me_scope 
                modifier = rival_insult_opinion
            }
        }

        scope:the_spy = {
            add_prestige = 150
            add_opinion = {
                target = scope:my_rival 
                modifier = rejected_opinion
            }
            add_opinion = {
                target = scope:me_scope 
                modifier = loyal_servant
            }
        }

        scope:me_scope = {
            add_prestige = -150
            add_piety = 150
            stress_impact = {
                calm = medium_stress_impact_loss
                patient = medium_stress_impact_loss
                forgiving = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                impatient = medium_stress_impact_gain
                vengeful = medium_stress_impact_gain
                arbitrary = medium_stress_impact_gain
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }

        scope:the_spy = {
            remove_character_flag = spy_interaction_flag
        }
    }

    option = {  #You let the spy go and forgive your rival...a very magnanimous move, but is it wise?
        name = friends_rivals_interactions_events.0014.c
        custom_tooltip = friends_rivals_interactions_events.0014.c.tooltip

        trigger = {
            is_alive = yes
            OR = { 
                has_trait = forgiving
                has_trait = patient
                has_trait = humble
            }
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = { 
            limit = { has_character_flag = spy_interaction_flag }
            save_scope_as = the_spy
        }

        scope:my_rival = {
            add_prestige = 150
            add_opinion = {
                target = scope:me_scope 
                modifier = defused_feud_escalation_opinion
            }
        }

        scope:the_spy = {
            add_prestige = 150
            add_opinion = {
                target = scope:my_rival 
                modifier = rejected_opinion
            }
            add_opinion = {
                target = scope:me_scope 
                modifier = loyal_servant
            }
        }

        every_living_character = {
            limit = { age > 15 liege = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
            add_opinion = {
                target = scope:me_scope
                modifier = heard_bad_rumours_opinion
            }
        }

        scope:me_scope = {
            add_prestige = -250
            add_piety = 250
            stress_impact = {
                calm = medium_stress_impact_loss
                patient = medium_stress_impact_loss
                humble = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                impatient = medium_stress_impact_gain
                vengeful = medium_stress_impact_gain
                arbitrary = medium_stress_impact_gain
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }

        scope:the_spy = {
            remove_character_flag = spy_interaction_flag
        }
    }

    option = {  #You brutally kill the spy in a fit of rage, but now your rival has a martyr to rally around and
        name = friends_rivals_interactions_events.0014.d
        custom_tooltip = friends_rivals_interactions_events.0014.d.tooltip

        trigger = {
            is_alive = yes
            OR = { 
                has_trait = vengeful
                has_trait = callous
                has_trait = arbitrary
            }
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = { 
            limit = { has_character_flag = spy_interaction_flag }
            save_scope_as = the_spy
        }

        scope:my_rival = {
            add_prestige = 150
            add_pressed_claim = scope:me_scope.primary_title
            add_opinion = {
                target = scope:me_scope 
                modifier = rival_insult_opinion
            }
        }

        scope:the_spy = {
            add_prestige = 150
            add_opinion = {
                target = scope:my_rival 
                modifier = rejected_opinion
            }
            add_opinion = {
                target = scope:me_scope 
                modifier = rejected_opinion
            }
            death = {
				death_reason = death_murder  
				killer = scope:me_scope
			}
        }

        scope:me_scope = {
            add_prestige = 250
            add_piety = -250
            stress_impact = {
                calm = medium_stress_impact_gain
                patient = medium_stress_impact_gain
                forgiving = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                impatient = medium_stress_impact_loss
                vengeful = medium_stress_impact_loss
                arbitrary = medium_stress_impact_loss
            }
        }

        every_living_character = {
            limit = { age > 15 liege = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
            add_opinion = {
                target = scope:me_scope
                modifier = debug_hates_liege_opinion
            }
            add_opinion = {
                target = scope:my_rival
                modifier = loyal_servant
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }

        scope:the_spy = {
            remove_character_flag = spy_interaction_flag
        }
    }
}

friends_rivals_interactions_events.0015 = {  #The Faminine Accusation!
    title = friends_rivals_interactions_events.0015.t
    desc = friends_rivals_interactions_events.0015.desc
    type = character_event

    theme = rival_relation
    override_background = {reference = throne_room_scope }  

    left_portrait = { 
        character = ROOT 
        animation = worry
    }

    right_portrait = { 
        character = scope:my_rival
        animation = personality_vengeful
    }

    immediate = {
        ROOT = {
            save_scope_as = me_scope
        }
        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }
    }

    option = {  #I have no part to play in this faminine! You accuse your rival of being a plague...No one buys it
        name = friends_rivals_interactions_events.0015.a
        custom_tooltip = friends_rivals_interactions_events.0015.a.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = -150
            add_opinion = {
                target = scope:me_scope 
                modifier = rival_insult_opinion
            }
        }

        every_living_character = {
            limit = { age > 15 is_courtier_of = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
            add_opinion = {
                target = scope:my_rival
                modifier = weak_excuses
            }
            add_opinion = {
                target = scope:me_scope
                modifier = weak_excuses
            }
        }

        scope:me_scope = {
            add_prestige = 150
            add_piety = -150
            stress_impact = {
                calm = medium_stress_impact_gain
                patient = medium_stress_impact_gain
                chaste = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                impatient = medium_stress_impact_loss
                callous = medium_stress_impact_loss
                arbitrary = medium_stress_impact_loss
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = {  #You let these rumors persist and your piety grows...but now everyone thinks you are a weak, diseased, plague causing leader
        name = friends_rivals_interactions_events.0015.b
        custom_tooltip = friends_rivals_interactions_events.0015.b.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = 150
            add_opinion = {
                target = scope:me_scope 
                modifier = rival_insult_opinion
            }
        }

        every_living_character = {
            limit = { age > 15 is_courtier_of = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
            add_opinion = {
                target = scope:me_scope
                modifier = heard_bad_rumours_opinion
            }
        }

        scope:me_scope = {
            add_prestige = -150
            add_piety = 150
            stress_impact = {
                calm = medium_stress_impact_loss
                patient = medium_stress_impact_loss
                chaste = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                impatient = medium_stress_impact_gain
                callous = medium_stress_impact_gain
                arbitrary = medium_stress_impact_gain
            }
        }
        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = {  #You go to the sickhouses yourself to show that you are a force for good not evil...will this work?
        name = friends_rivals_interactions_events.0015.c
        custom_tooltip = friends_rivals_interactions_events.0015.c.tooltip

        trigger = {
            is_alive = yes
            OR = { 
                has_trait = zealous
                has_trait = paragon
                has_trait = forgiving
            }
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = -150
            add_opinion = {
                target = scope:me_scope 
                modifier = rival_insult_opinion
            }
        }

        random_list = {
            50 = {  #You get sick!
                every_living_character = {
                    limit = { age > 15 is_courtier_of = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope }}
                    add_opinion = {
                        target = scope:me_scope
                        modifier = heard_bad_rumours_opinion
                    }
                }

                scope:me_scope = {
                    add_prestige = -150
                    add_piety = 150
                    add_trait = smallpox
                    stress_impact = {
                        calm = medium_stress_impact_gain
                        patient = medium_stress_impact_gain
                        chaste = medium_stress_impact_gain
                        arrogant = medium_stress_impact_loss
                        impatient = medium_stress_impact_loss
                        callous = medium_stress_impact_loss
                        arbitrary = medium_stress_impact_loss
                    }
                }
            }

            50 = {  #You actually help some of the people recover
                every_living_character = {
                    limit = { age > 15 is_courtier_of = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
                    add_opinion = {
                        target = scope:me_scope
                        modifier = loyal_servant
                    }
                }

                scope:me_scope = {
                    add_prestige = 150
                    add_piety = 150
                    stress_impact = {
                        calm = medium_stress_impact_loss
                        patient = medium_stress_impact_loss
                        chaste = medium_stress_impact_loss
                        arrogant = medium_stress_impact_gain
                        impatient = medium_stress_impact_gain
                        callous = medium_stress_impact_gain
                        arbitrary = medium_stress_impact_gain
                    }
                }
            }
        }
        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = {  #Good. Let them think I am a harbinger of disease and doom!
        name = friends_rivals_interactions_events.0015.d
        custom_tooltip = friends_rivals_interactions_events.0015.d.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = callous
                has_trait = deceitful
                has_trait = cynical
            }
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = -150
            add_opinion = {
                target = scope:me_scope 
                modifier = rival_insult_opinion
            }
        }

        every_living_character = {
            limit = { age > 15 is_courtier_of = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
            add_opinion = {
                target = scope:me_scope
                modifier = heard_bad_rumours_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 250
            add_piety = -150
            stress_impact = {
                calm = medium_stress_impact_gain
                patient = medium_stress_impact_gain
                chaste = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                cynical = medium_stress_impact_loss
                callous = medium_stress_impact_loss
                deceitful = medium_stress_impact_loss
            }
        }
        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }
}

friends_rivals_interactions_events.0016 = {  #The Funeral Encounter
    title = friends_rivals_interactions_events.0016.t
    desc = friends_rivals_interactions_events.0016.desc
    type = character_event

    theme = rival_relation
    override_background = {reference = temple_church }  

    left_portrait = { 
        character = ROOT 
        animation = disgust
    }

    right_portrait = { 
        character = scope:my_rival
        animation = disgust
    }

    immediate = {
        ROOT = {
            save_scope_as = me_scope
        }
        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }
    }

    option = {  #You do everything you can to get away from your rival...at the cost of you prestige
        name = friends_rivals_interactions_events.0016.a
        custom_tooltip = friends_rivals_interactions_events.0016.a.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = 150
            add_opinion = {
                target = scope:me_scope 
                modifier = rival_insult_opinion
            }
        }

        scope:me_scope = {
            add_prestige = -150
            stress_impact = {
                calm = medium_stress_impact_loss
                patient = medium_stress_impact_loss
                craven = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                brave = medium_stress_impact_gain
                callous = medium_stress_impact_gain
                arbitrary = medium_stress_impact_gain
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = { #You confront your rival...but neither one of you looks good fighting at a funeral
        name = friends_rivals_interactions_events.0016.b
        custom_tooltip = friends_rivals_interactions_events.0016.b.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = -150
            add_opinion = {
                target = scope:me_scope 
                modifier = rival_insult_opinion
            }
        }

        scope:me_scope = {
            add_prestige = -150
            stress_impact = {
                calm = medium_stress_impact_gain
                patient = medium_stress_impact_gain
                craven = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                brave = medium_stress_impact_loss
                callous = medium_stress_impact_loss
                arbitrary = medium_stress_impact_loss
            }
        }
        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = {  #You think it would be hillarious to trip your rival right into the casket
        name = friends_rivals_interactions_events.0016.c
        custom_tooltip = friends_rivals_interactions_events.0016.c.tooltip

        trigger = {
            is_alive = yes
            OR = { 
                has_trait = eccentric
                has_trait = arbitrary
                has_trait = deceitful
            }
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = -250
            add_opinion = {
                target = scope:me_scope 
                modifier = rejected_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 250
            add_piety = -250
            stress_impact = {
                deceitful = medium_stress_impact_loss
                callous = medium_stress_impact_loss
                eccentric = medium_stress_impact_loss
                arbitrary = medium_stress_impact_loss
                forgiving = medium_stress_impact_gain
                just = medium_stress_impact_gain
                compassionate = medium_stress_impact_gain
            }
        }

        random_list = {
            25 = {  #The people share your morbid sense of humor and find the situation hilarious
                every_living_character = {
                    limit = { age > 15 is_courtier_of = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
                    add_opinion = {
                        target = scope:me_scope
                        modifier = loyal_servant
                    }
                }
            }
            75 = { #The people think you are a disgusting, disrespectful fool for doing this at a funeral
                every_living_character = {
                    limit = { age > 15 is_courtier_of = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
                    add_opinion = {
                        target = scope:me_scope
                        modifier = rejected_opinion
                    }
                }
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = {  #You use this situation to try to mend the rivarly
        name = friends_rivals_interactions_events.0016.d
        custom_tooltip = friends_rivals_interactions_events.0016.d.tooltip

        trigger = {
            is_alive = yes
            OR = { 
                has_trait = compassionate
                has_trait = just
                has_trait = forgiving
            }
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = 150
            add_opinion = {
                target = scope:me_scope 
                modifier = defused_feud_escalation_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 150
            add_piety = 150
            stress_impact = {
                calm = medium_stress_impact_loss
                patient = medium_stress_impact_loss
                humble = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                impatient = medium_stress_impact_gain
                callous = medium_stress_impact_gain
                arbitrary = medium_stress_impact_gain
            }
        }

        random_list = {
            65 = {  #The rivarly ends
                remove_relation_rival = scope:my_rival
            }
            35 = {  #It does not

            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }
}

friends_rivals_interactions_events.0017 = {  #The Mysterious Letter
    title = friends_rivals_interactions_events.0017.t
    desc = friends_rivals_interactions_events.0017.desc
    type = character_event

    theme = rival_relation
    override_background = {reference = council_chamber }  

    left_portrait = { 
        character = ROOT 
        animation = reading
    }

    right_portrait = { 
        character = scope:my_rival
        animation = schadenfreude
    }

    immediate = {
        ROOT = {
            save_scope_as = me_scope
        }
        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }
    }

    option = {  #You ignore the letter and go about your day...but now you are wondering who sent it and what it said
        name = friends_rivals_interactions_events.0017.a
        custom_tooltip = friends_rivals_interactions_events.0017.a.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = 50
            add_opinion = {
                target = scope:me_scope
                modifier = uncertain_lineage_opinion
            }
        }

        scope:me_scope = {
            add_prestige = -50
            add_piety = 50
            stress_impact = {
                calm = medium_stress_impact_loss
                patient = medium_stress_impact_loss
                temperate = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                impatient = medium_stress_impact_gain
                callous = medium_stress_impact_gain
                brave = medium_stress_impact_gain
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = {  #You confront those who are desperate to open the letter and warn them about undue curiosity...but now everyone is wondering what was in the letter and why you are so concerned about it
        name = friends_rivals_interactions_events.0017.b
        custom_tooltip = friends_rivals_interactions_events.0017.b.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = 150
            add_opinion = {
                target = scope:me_scope
                modifier = uncertain_lineage_opinion
            }
        }

        every_living_character = {
            limit = { age > 15 is_courtier_of = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
            add_opinion = {
                target = scope:me_scope
                modifier = uncertain_lineage_opinion
            }
        }

        scope:me_scope = {
            add_prestige = -50
            add_piety = 50
            stress_impact = {
                calm = medium_stress_impact_loss
                patient = medium_stress_impact_loss
                temperate = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                impatient = medium_stress_impact_gain
                callous = medium_stress_impact_gain
                brave = medium_stress_impact_gain
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = {  #You are open and let everyone see the letter...but will they all believe it is simply a farce?
        name = friends_rivals_interactions_events.0017.c
        custom_tooltip = friends_rivals_interactions_events.0017.c.tooltip

        trigger = {
            is_alive = yes
            OR = { 
                has_trait = honest
                has_trait = just
            }
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = -50
            add_opinion = {
                target = scope:me_scope
                modifier = uncertain_lineage_opinion
            }
        }

        random_list = {
            50 = {  #The people think the letter is a forgery and it blows over quickly
                every_living_character = {
                    limit = { age > 15 is_courtier_of = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
                    add_opinion = {
                        target = scope:me_scope
                        modifier = loyal_servant
                    }
                }
            }

            50 = {  #The people think the letter is real and it causes a lot of unrest
                every_living_character = {
                    limit = { age > 15 is_courtier_of = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
                    add_opinion = {
                        target = scope:me_scope
                        modifier = uncertain_lineage_opinion
                    }
                }
            }
        }

        scope:me_scope = {
            add_prestige = -150
            add_piety = 150
            stress_impact = {
                calm = medium_stress_impact_loss
                honest = medium_stress_impact_loss
                brave = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                impatient = medium_stress_impact_gain
                callous = medium_stress_impact_gain
                craven = medium_stress_impact_gain
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }

    option = {  #You tweak a few things in the letter before revealing it to the public...which now turns the accusations against your rival!
        name = friends_rivals_interactions_events.0017.d
        custom_tooltip = friends_rivals_interactions_events.0017.d.tooltip

        trigger = {
            is_alive = yes
            OR = { 
                has_trait = deceitful
                has_trait = cynical
                has_trait = arbitrary
            }
        }

        random_living_character = {
            limit = { has_character_flag = rival_interaction_flag }
            save_scope_as = my_rival
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_rival = {
            add_prestige = -150
            add_opinion = {
                target = scope:me_scope
                modifier = rival_insult_opinion
            }
        }

        every_living_character = {
            limit = { age > 15 is_courtier_of = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
            add_opinion = {
                target = scope:my_rival
                modifier = uncertain_lineage_opinion
            }
            add_opinion = {
                target = scope:me_scope
                modifier = loyal_servant
            }
        }

        scope:me_scope = {
            add_prestige = 150
            add_piety = -150
            stress_impact = {
                calm = medium_stress_impact_gain
                honest = medium_stress_impact_gain
                brave = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                deceitful = medium_stress_impact_loss
                callous = medium_stress_impact_loss
                craven = medium_stress_impact_loss
            }
        }

        scope:my_rival = {
            remove_character_flag = rival_interaction_flag
        }
    }
}

#Beginning of Friend Events


friends_rivals_interactions_events.1001 = {   #Going To The Festival With Your Friend!
    title = friends_rivals_interactions_events.1001.t
    desc = friends_rivals_interactions_events.1001.desc
    type = character_event

    theme = friendly
    override_background = {reference = terrain_activity }  

    left_portrait = { 
        character = ROOT 
        animation = laugh
    }

    right_portrait = { 
        character = scope:my_friend
        animation = laugh
    }

    immediate = {
        ROOT = {
            save_scope_as = me_scope
        }
        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }
    }

    option = {  #You and your friend don't let the accident get you down, and you have a great time
        name = friends_rivals_interactions_events.1001.a
        custom_tooltip = friends_rivals_interactions_events.1001.a.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_friend = {
            add_prestige = 150
            add_opinion = {
                target = scope:me_scope
                modifier = shared_interests_opinion
            }
        }

        scope:me_scope = {
            add_prestige = -150
            add_piety = 150
            stress_impact = {
                calm = medium_stress_impact_loss
                patient = medium_stress_impact_loss
                forgiving = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                impatient = medium_stress_impact_gain
                callous = medium_stress_impact_gain
                vengeful = medium_stress_impact_gain
            }
        }

        every_living_character = {
            limit = { age > 15 is_courtier_of = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
            add_opinion = {
                target = scope:my_friend
                modifier = weak_excuses
            }
            add_opinion = {
                target = scope:me_scope
                modifier = weak_excuses
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = {  #You scold your friend for being clumsy and putting a damper on the day...not the best look for you or your friend
        name = friends_rivals_interactions_events.1001.b
        custom_tooltip = friends_rivals_interactions_events.1001.b.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_friend = {
            add_prestige = -150
            add_opinion = {
                target = scope:me_scope
                modifier = agitated_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 150
            add_piety = -150
            stress_impact = {
                calm = medium_stress_impact_gain
                patient = medium_stress_impact_gain
                forgiving = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                impatient = medium_stress_impact_loss
                callous = medium_stress_impact_loss
                vengeful = medium_stress_impact_loss
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = {  #You show great humility and forgiveness in the situation, which makes you very magnanimous
        name = friends_rivals_interactions_events.1001.c
        custom_tooltip = friends_rivals_interactions_events.1001.c.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = forgiving
                has_trait = patient
                has_trait = just
            }
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_friend = {
            add_prestige = 150
            add_opinion = {
                target = scope:me_scope
                modifier = shared_interests_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 150
            add_piety = 150
            stress_impact = {
                calm = medium_stress_impact_loss
                patient = medium_stress_impact_loss
                just = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                impatient = medium_stress_impact_gain
                callous = medium_stress_impact_gain
                vengeful = medium_stress_impact_gain
            }
        }

        every_living_character = {
            limit = { age > 15 is_courtier_of = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
            add_opinion = {
                target = scope:me_scope
                modifier = loyal_servant
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = {  #You have your guards burn down the village for this insult. Slightly unhinged, but at least you feel better
        name = friends_rivals_interactions_events.1001.d
        custom_tooltip = friends_rivals_interactions_events.1001.d.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = vengeful
                has_trait = callous
                has_trait = lunatic_1
            }
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_friend = {
            add_prestige = 150
            add_opinion = {
                target = scope:me_scope
                modifier = rejected_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 250
            add_piety = -250
            stress_impact = {
                calm = medium_stress_impact_gain
                patient = medium_stress_impact_gain
                forgiving = medium_stress_impact_gain
                vengeful = medium_stress_impact_loss
                arrogant = medium_stress_impact_loss
                lunatic_1 = medium_stress_impact_loss
                callous = medium_stress_impact_loss
            }
        }

        every_living_character = {
            limit = { age > 15 is_courtier_of = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
            add_opinion = {
                target = scope:me_scope
                modifier = heard_bad_rumours_opinion
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }
}

friends_rivals_interactions_events.1002 = {  #The hunt for the golden stag!
    title = friends_rivals_interactions_events.1002.t
    desc = friends_rivals_interactions_events.1002.desc
    type = character_event

    theme = friendly
    override_background = {reference = wilderness_forest_pine }  

    left_portrait = { 
        character = ROOT 
        animation = personality_greedy
    }

    right_portrait = { 
        character = scope:my_friend
        animation = celebrate_spear
    }

    immediate = {
        ROOT = {
            save_scope_as = me_scope
        }
        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }
    }

    option = {  #You say that is fine that your friend caught the stag...even if you are a little jealous
        name = friends_rivals_interactions_events.1002.a
        custom_tooltip = friends_rivals_interactions_events.1002.a.tooltip

        trigger = { 
            is_alive = yes
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_friend = {
            add_prestige = 150
            add_opinion = {
                target = scope:me_scope
                modifier = friendly_interaction
            }
        }

        scope:me_scope = {
            add_prestige = -150
            add_piety = 150
            stress_impact = {
                calm = medium_stress_impact_loss
                patient = medium_stress_impact_loss
                forgiving = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                brave = medium_stress_impact_gain
                callous = medium_stress_impact_gain
                vengeful = medium_stress_impact_gain
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }   
    }

    option = {  #Your friend hunts down the stag and that's great...but you want the credit for it and you make sure everyone knows it
        name = friends_rivals_interactions_events.1002.b
        custom_tooltip = friends_rivals_interactions_events.1002.b.tooltip

        trigger = { 
            is_alive = yes
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_friend = {
            add_prestige = -150
            add_opinion = {
                target = scope:me_scope
                modifier = agitated_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 150
            add_piety = -150
            stress_impact = {
                calm = medium_stress_impact_gain
                patient = medium_stress_impact_gain
                forgiving = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                impatient = medium_stress_impact_loss
                callous = medium_stress_impact_loss
                vengeful = medium_stress_impact_loss
            }
        }

        every_living_character = {
            limit = { age > 15 is_courtier_of = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
            add_opinion = {
                target = scope:my_friend
                modifier = weak_excuses
            }
            add_opinion = {
                target = scope:me_scope
                modifier = weak_excuses
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = {  #That's great that you caught the golden stag! well done! We will tell everyone!
        name = friends_rivals_interactions_events.1002.c
        custom_tooltip = friends_rivals_interactions_events.1002.c.tooltip

        trigger = { 
            is_alive = yes
            OR = {
                has_trait = forgiving
                has_trait = patient
                has_trait = just
            }
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_friend = {
            add_prestige = 200
            add_gold = 100
            add_opinion = {
                target = scope:me_scope
                modifier = friendly_interaction
            }
        }

        scope:me_scope = {
            add_prestige = -200
            add_piety = 200
            stress_impact = {
                calm = medium_stress_impact_loss
                patient = medium_stress_impact_loss
                just = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                impatient = medium_stress_impact_gain
                callous = medium_stress_impact_gain
                vengeful = medium_stress_impact_gain
            }
        }

        every_living_character = {
            limit = { age > 15 is_courtier_of = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
            add_opinion = {
                target = scope:my_friend
                modifier = loyalty_opinion
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = {  #Your friend has caught the golden stag and the glory that comes with it...but you really just care about the money it will bring in.
        name = friends_rivals_interactions_events.1002.d
        custom_tooltip = friends_rivals_interactions_events.1002.d.tooltip

        trigger = { 
            is_alive = yes
            OR = {
                has_trait = greedy
                has_trait = craven
            }
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_friend = {
            add_prestige = 150
            add_opinion = {
                target = scope:me_scope
                modifier = agitated_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 150
            add_piety = -150
            add_gold = 100
            stress_impact = {
                calm = medium_stress_impact_gain
                generous = medium_stress_impact_gain
                patient = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                greedy = medium_stress_impact_loss
                craven = medium_stress_impact_loss
                shrewd = medium_stress_impact_loss
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }
}

friends_rivals_interactions_events.1003 = { #The Drunken Confession
    title = friends_rivals_interactions_events.1003.t
    desc = friends_rivals_interactions_events.1003.desc
    type = character_event

    theme = friendly
    override_background = {reference = feast }  

    left_portrait = { 
        character = ROOT 
        animation = shock
    }

    right_portrait = { 
        character = scope:my_friend
        animation = beg
    }

    immediate = {
        ROOT = {
            save_scope_as = me_scope
        }
        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }
    }

    option = {  #You think what? You let your friends confession slide with courtesy...but you will not forget it
        name = friends_rivals_interactions_events.1003.a
        custom_tooltip = friends_rivals_interactions_events.1003.a.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_friend = {
            add_prestige = 50
            add_opinion = {
                target = scope:me_scope
                modifier = unfriendly_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 50
            add_piety = -50
            stress_impact = {
                calm = medium_stress_impact_loss
                patient = medium_stress_impact_loss
                forgiving = medium_stress_impact_gain
                arrogant = medium_stress_impact_gain
                impatient = medium_stress_impact_gain
                callous = medium_stress_impact_gain
                vengeful = medium_stress_impact_loss
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = {  #You bicker with your friend about their confession...not the best look for either of you
        name = friends_rivals_interactions_events.1003.b
        custom_tooltip = friends_rivals_interactions_events.1003.b.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_friend = {
            add_prestige = -50
            add_opinion = {
                target = scope:me_scope
                modifier = agitated_opinion
            }
        }

        scope:me_scope = {
            add_prestige = -50
            add_piety = -50
            stress_impact = {
                calm = medium_stress_impact_gain
                patient = medium_stress_impact_gain
                forgiving = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                impatient = medium_stress_impact_loss
                callous = medium_stress_impact_loss
                vengeful = medium_stress_impact_loss
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = {  #You are very understanding of your friend's confession and you show great empathy for them in this situation, which makes you a great friend
        name = friends_rivals_interactions_events.1003.c
        custom_tooltip = friends_rivals_interactions_events.1003.c.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = forgiving
                has_trait = patient
                has_trait = just
            }
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_friend = {
            add_prestige = 150
            add_opinion = {
                target = scope:me_scope
                modifier = loyal_servant
            }
        }

        scope:me_scope = {
            add_prestige = -150
            add_piety = 150
            stress_impact = {
                calm = medium_stress_impact_loss
                patient = medium_stress_impact_loss
                just = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                impatient = medium_stress_impact_gain
                callous = medium_stress_impact_gain
                vengeful = medium_stress_impact_gain
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = {  #You punch your friend in the face...not the best hour of your friendship
        name = friends_rivals_interactions_events.1003.d
        custom_tooltip = friends_rivals_interactions_events.1003.d.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = vengeful
                has_trait = callous
                has_trait = wrathful
            }
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_friend = {
            add_prestige = -150
            add_opinion = {
                target = scope:me_scope
                modifier = rejected_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 150
            add_piety = -150
            stress_impact = {
                calm = medium_stress_impact_gain
                patient = medium_stress_impact_gain
                forgiving = medium_stress_impact_gain
                vengeful = medium_stress_impact_loss
                arrogant = medium_stress_impact_loss
                callous = medium_stress_impact_loss
                wrathful = medium_stress_impact_loss
            }
        }

        random_list = {
            50 = {  #They are no longer your friend
                remove_relation_friend = scope:my_friend
            }
            50 = { #You guys still are...but there is much hurt to overcome
                scope:my_friend = {
                    add_opinion = {
                        target = scope:me_scope
                        modifier = weak_excuses
                    }
                }
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }
}

friends_rivals_interactions_events.1004 = {  #The Inconvient Favor For A Friend
    title = friends_rivals_interactions_events.1004.t
    desc = friends_rivals_interactions_events.1004.desc
    type = character_event

    theme = friendly
    override_background = {reference = corridor_night }  

    left_portrait = { 
        character = ROOT 
        animation = debating
    }

    right_portrait = { 
        character = scope:my_friend
        animation = beg
    }

    immediate = {
        ROOT = {
            save_scope_as = me_scope
        }
        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }
    }

    option = {  #You reluctantly agree to do the favor for your friend...but you are not happy about it
        name = friends_rivals_interactions_events.1004.a
        custom_tooltip = friends_rivals_interactions_events.1004.a.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_friend = {
            add_prestige = 50
            add_opinion = {
                target = scope:me_scope
                modifier = unfriendly_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 50
            add_piety = -50
            stress_impact = {
                generous = medium_stress_impact_loss
                patient = medium_stress_impact_loss
                calm = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                impatient = medium_stress_impact_gain
                callous = medium_stress_impact_gain
                vengeful = medium_stress_impact_gain
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = { #You do not do the favor for your friend and you tell them that you are too busy to do it...not the best look for you or your friend
        name = friends_rivals_interactions_events.1004.b
        custom_tooltip = friends_rivals_interactions_events.1004.b.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_friend = {
            add_prestige = -50
            add_opinion = {
                target = scope:me_scope
                modifier = agitated_opinion
            }
        }

        scope:me_scope = {
            add_prestige = -50
            add_piety = -50
            stress_impact = {
                generous = medium_stress_impact_gain
                patient = medium_stress_impact_gain
                calm = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                impatient = medium_stress_impact_loss
                callous = medium_stress_impact_loss
                vengeful = medium_stress_impact_loss
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = {  #You go above and beyond to do the favor for your friend, which makes you a great friend!
        name = friends_rivals_interactions_events.1004.c
        custom_tooltip = friends_rivals_interactions_events.1004.c.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = brave
                has_trait = diligent
                has_trait = ambitious
            }
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_friend = {
            add_prestige = 150
            add_opinion = {
                target = scope:me_scope
                modifier = loyal_servant
            }
        }

        scope:me_scope = {
            add_prestige = -150
            add_piety = 150
            stress_impact = {
                brave = medium_stress_impact_loss
                diligent = medium_stress_impact_loss
                ambitious = medium_stress_impact_loss
                craven = medium_stress_impact_gain
                lazy = medium_stress_impact_gain
                callous = medium_stress_impact_gain
                shy = medium_stress_impact_gain
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = {  #You absolutely refuse to do the favor for your friend and you tell them that you have much better things to do
        name = friends_rivals_interactions_events.1004.d
        custom_tooltip = friends_rivals_interactions_events.1004.d.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = vengeful
                has_trait = callous
                has_trait = wrathful
            }
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_friend = {
            add_prestige = -150
            add_opinion = {
                target = scope:me_scope
                modifier = rejected_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 150
            add_piety = -150
            stress_impact = {
                calm = medium_stress_impact_gain
                patient = medium_stress_impact_gain
                forgiving = medium_stress_impact_gain
                vengeful = medium_stress_impact_loss
                arrogant = medium_stress_impact_loss
                callous = medium_stress_impact_loss
                wrathful = medium_stress_impact_loss
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }
}

friends_rivals_interactions_events.1005 = {  #A courtier's confession to your friend...
    title = friends_rivals_interactions_events.1005.t
    desc = friends_rivals_interactions_events.1005.desc
    type = character_event

    theme = friendly
    override_background = {reference = corridor_night }  

    left_portrait = { 
        character = ROOT 
        animation = thinking
    }

    right_portrait = { 
        character = scope:my_friend
        animation = worry
    }

    immediate = {
        ROOT = {
            save_scope_as = me_scope
        }
        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        random_living_character = {
            limit = { age > 15 is_courtier_of = scope:me_scope }
            add_character_flag = friend_courtier_flag
            save_scope_as = my_courtier
        }
    }

    option = {  #You dont tell anyone the secret...but you look at the courtier a little differently now that you know this about them...and they know it
        name = friends_rivals_interactions_events.1005.a
        custom_tooltip = friends_rivals_interactions_events.1005.a.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_courtier_flag }
            save_scope_as = my_courtier
        }

        scope:my_courtier = {
            add_prestige = -50
            add_opinion = {
                target = scope:me_scope
                modifier = distrustful
            }
            add_opinion = {
                target = scope:my_friend
                modifier = exposed_my_secret_opinion
            }
        }

        scope:me_scope = {
            add_prestige = -50
            add_piety = -50
            stress_impact = {
                calm = medium_stress_impact_gain
                patient = medium_stress_impact_gain
                forgiving = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                impatient = medium_stress_impact_loss
                callous = medium_stress_impact_loss
                vengeful = medium_stress_impact_loss
            }
        }

        scope:my_friend = {
            add_prestige = -50
            add_opinion = {
                target = scope:me_scope
                modifier = agitated_opinion
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }

        scope:my_courtier = {
            remove_character_flag = friend_courtier_flag
        }
    }

    option = {  #You had to tell someone the secret...who goes on to tell everyone at court
        name = friends_rivals_interactions_events.1005.b
        custom_tooltip = friends_rivals_interactions_events.1005.b.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_courtier_flag }
            save_scope_as = my_courtier
        }

        scope:my_courtier = {
            add_prestige = -150
            add_opinion = {
                target = scope:me_scope
                modifier = distrustful
            }
            add_opinion = {
                target = scope:my_friend
                modifier = exposed_my_secret_opinion
            }
        }

        scope:me_scope = {
            add_prestige = -150
            add_piety = -150
            stress_impact = {
                calm = medium_stress_impact_gain
                patient = medium_stress_impact_gain
                forgiving = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                impatient = medium_stress_impact_loss
                callous = medium_stress_impact_loss
                vengeful = medium_stress_impact_loss
            }
        }

        scope:my_friend = {
            add_prestige = -150
            add_opinion = {
                target = scope:me_scope
                modifier = agitated_opinion
            }
        }

        every_living_character = {
            limit = { age > 15 is_courtier_of = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
            add_opinion = {
                target = scope:my_courtier
                modifier = heard_bad_rumours_opinion
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }

        scope:my_courtier = {
            remove_character_flag = friend_courtier_flag
        }
    }

    option = {  #You allow this secret to stay hidden, which your friend greatly appreciates
        name = friends_rivals_interactions_events.1005.c
        custom_tooltip = friends_rivals_interactions_events.1005.c.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = calm
                has_trait = patient
                has_trait = temperate
            }
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_courtier_flag }
            save_scope_as = my_courtier
        }

        scope:my_courtier = {
            add_prestige = 150
            add_opinion = {
                target = scope:my_friend
                modifier = loyal_servant
            }
        }

        scope:me_scope = {
            add_prestige = 150
            add_piety = -50
            stress_impact = {
                calm = medium_stress_impact_loss
                patient = medium_stress_impact_loss
                temperate = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                impatient = medium_stress_impact_gain
                callous = medium_stress_impact_gain
                honest = medium_stress_impact_gain
            }
        }

        scope:my_friend = {
            add_prestige = 150
            add_opinion = {
                target = scope:me_scope
                modifier = loyal_servant
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }

        scope:my_courtier = {
            remove_character_flag = friend_courtier_flag
        }
    }

    option = {  #You let the secret stay hidden...at the price of a hook on the courtier
        name = friends_rivals_interactions_events.1005.d
        custom_tooltip = friends_rivals_interactions_events.1005.d.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = ambitious
                has_trait = deceitful
                has_trait = cynical
            }
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_courtier_flag }
            save_scope_as = my_courtier
        }

        scope:my_courtier = {
            add_prestige = -250
            add_opinion = {
                target = scope:my_friend
                modifier = distrustful
            }
            add_opinion = {
                target = scope:me_scope
                modifier = distrustful
            }
        }

        scope:me_scope = {
            add_prestige = 250
            add_piety = -250
            add_hook_if_possible_default_length_effect = {
                TARGET = scope:my_courtier
                TYPE = manipulation_hook
            }
            stress_impact = {
                calm = medium_stress_impact_gain
                patient = medium_stress_impact_gain
                temperate = medium_stress_impact_gain
                ambitious = medium_stress_impact_loss
                deceitful = medium_stress_impact_loss
                callous = medium_stress_impact_loss
                cynical = medium_stress_impact_loss
            }
        }

        scope:my_friend = {
            add_prestige = -250
            add_opinion = {
                target = scope:me_scope
                modifier = agitated_opinion
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }

        scope:my_courtier = {
            remove_character_flag = friend_courtier_flag
        }
    }
}

friends_rivals_interactions_events.1006 = {  #The new sword gift!
    title = friends_rivals_interactions_events.1006.t
    desc = friends_rivals_interactions_events.1006.desc
    type = character_event 

    theme = friendly
    override_background = {reference = throne_room_scope }  

    left_portrait = { 
        character = ROOT 
        animation = disappointed
    }

    right_portrait = { 
        character = scope:my_friend
        animation = happiness
    }

    immediate = {
        ROOT = {
            save_scope_as = me_scope
        }
        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }
    }

    option = {  #You accept the gift...very much begruginly
        name = friends_rivals_interactions_events.1006.a
        custom_tooltip = friends_rivals_interactions_events.1006.a.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_friend = {
            add_prestige = 150
            add_opinion = {
                target = scope:me_scope
                modifier = unfriendly_opinion
            }
        }

        scope:me_scope = {
            add_prestige = -50
            add_piety = 50
            stress_impact = {
                calm = medium_stress_impact_loss
                patient = medium_stress_impact_loss
                craven = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                brave = medium_stress_impact_gain
                callous = medium_stress_impact_gain
                ambitious = medium_stress_impact_gain
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = {  #You accept the gift but "accidentally" lose it...your friend knows better and is not happy
        name = friends_rivals_interactions_events.1006.b
        custom_tooltip = friends_rivals_interactions_events.1006.b.tooltip

        trigger = {
            is_alive = yes
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_friend = {
            add_prestige = -50
            add_opinion = {
                target = scope:me_scope
                modifier = agitated_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 50
            add_piety = -50
            stress_impact = {
                calm = medium_stress_impact_gain
                patient = medium_stress_impact_gain
                craven = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                brave = medium_stress_impact_loss
                callous = medium_stress_impact_loss
                ambitious = medium_stress_impact_loss
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = {  #You are a great warrior! Even with a horrible blade, no one can match your skill! You accept the gift and use it despite its flaws!
        name = friends_rivals_interactions_events.1006.c
        custom_tooltip = friends_rivals_interactions_events.1006.c.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = brave
                has_trait = education_martial_3
                has_trait = education_martial_4
                has_trait = education_martial_5
            }
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_friend = {
            add_prestige = 150
            add_opinion = {
                target = scope:me_scope
                modifier = loyal_servant
            }
        }

        scope:me_scope = {
            add_prestige = -150
            add_piety = 50
            stress_impact = {
                arrogant = medium_stress_impact_loss
                impatient = medium_stress_impact_loss
                brave = medium_stress_impact_loss
                cynical = medium_stress_impact_gain
                craven = medium_stress_impact_gain
                callous = medium_stress_impact_gain
                calm = medium_stress_impact_gain
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = {  #You thank your friend profusely for the gift...and only bring it out when they are around
        name = friends_rivals_interactions_events.1006.d
        custom_tooltip = friends_rivals_interactions_events.1006.d.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = deceitful
                has_trait = intellect_good_1
                has_trait = intellect_good_2
                has_trait = intellect_good_3
                has_trait = shrewd
            }
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        ROOT = {
            save_scope_as = me_scope
        }

        scope:my_friend = {
            add_prestige = 150
            add_opinion = {
                target = scope:me_scope
                modifier = loyal_servant
            }
        }

        scope:me_scope = {
            add_prestige = 250
            add_piety = -50
            stress_impact = {
                cynical = medium_stress_impact_loss
                shrewd = medium_stress_impact_loss
                deceitful = medium_stress_impact_loss
                calm = medium_stress_impact_gain
                arrogant = medium_stress_impact_gain
                just = medium_stress_impact_gain
                honest = medium_stress_impact_gain
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }
}

friends_rivals_interactions_events.1007 = {  #The Quiet Counsel
    title = friends_rivals_interactions_events.1007.t
    desc = friends_rivals_interactions_events.1007.desc
    type = character_event

    theme = friendly
    override_background = {reference = bedchamber }  

    left_portrait = { 
        character = ROOT 
        animation = thinking
    }

    right_portrait = { 
        character = scope:my_friend
        animation = personality_honorable
    }

    immediate = {
        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }
    }

    option = {    #You take your friends advice...and see where it leads you
        name = friends_rivals_interactions_events.1007.a
        custom_tooltip = friends_rivals_interactions_events.1007.a.tooltip

        trigger = {
            is_alive = yes
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        scope:my_friend = {
            add_opinion = {
                target = scope:me_scope
                modifier = optimistic_about_friendship_opinion
            }
        }

        random_list = {
            50 = {  #It was great advice!
                scope:me_scope = {
                    add_prestige = 150
                    add_piety = 150
                    stress_impact = {
                        calm = medium_stress_impact_loss
                        patient = medium_stress_impact_loss
                        just = medium_stress_impact_loss
                        arrogant = medium_stress_impact_loss
                        impatient = medium_stress_impact_loss
                        callous = medium_stress_impact_loss
                        vengeful = medium_stress_impact_loss
                    }
                }

                hidden_effect = {
                    every_living_character = {
                        limit = { age > 25 is_vassal_of = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
                        add_opinion = {
                            target = scope:me_scope
                            modifier = humored_opinion
                        }
                    }

                }

                scope:my_friend = {
                    add_prestige = 150
                }
            }

            50 = { #It was terrible advice!
                scope:me_scope = {
                    add_prestige = -150
                    add_piety = -150
                    stress_impact = {
                        calm = medium_stress_impact_gain
                        patient = medium_stress_impact_gain
                        just = medium_stress_impact_gain
                        arrogant = medium_stress_impact_gain
                        impatient = medium_stress_impact_gain
                        callous = medium_stress_impact_gain
                        vengeful = medium_stress_impact_gain
                    }
                }

                hidden_effect = {
                    every_living_character = {
                    limit = { age > 25 is_vassal_of = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
                        add_opinion = {
                            target = scope:me_scope
                            modifier = heard_bad_rumours_opinion
                        }
                    }
                }

                scope:my_friend = {
                    add_prestige = -150
                }
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = {  #You ignore your friend's advice...but they know you did and they are not happy about it
        name = friends_rivals_interactions_events.1007.b
        custom_tooltip = friends_rivals_interactions_events.1007.b.tooltip

        trigger = {
            is_alive = yes
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        scope:my_friend = {
            add_opinion = {
                target = scope:me_scope
                modifier = rejected_by_friend_opinion
            }
        }

        random_list = {
            50 = {  #It was a great idea!
                scope:me_scope = {
                    add_prestige = 150
                    add_piety = 150
                    stress_impact = {
                        calm = medium_stress_impact_loss
                        patient = medium_stress_impact_loss
                        just = medium_stress_impact_loss
                        arrogant = medium_stress_impact_loss
                        impatient = medium_stress_impact_loss
                        callous = medium_stress_impact_loss
                        vengeful = medium_stress_impact_loss
                    }
                }

                hidden_effect = {
                    every_living_character = {
                        limit = { age > 25 is_vassal_of = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
                        add_opinion = {
                            target = scope:me_scope
                            modifier = humored_opinion
                        }
                    }
                }

                scope:my_friend = {
                    add_prestige = 150
                }
            }

            50 = { #It was a terrible idea!
                scope:me_scope = {
                    add_prestige = -150
                    add_piety = -150
                    stress_impact = {
                        calm = medium_stress_impact_gain
                        patient = medium_stress_impact_gain
                        just = medium_stress_impact_gain
                        arrogant = medium_stress_impact_gain
                        impatient = medium_stress_impact_gain
                        callous = medium_stress_impact_gain
                        vengeful = medium_stress_impact_gain
                    }
                }

                hidden_effect = {
                    every_living_character = {
                        limit = { age > 25 is_vassal_of = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
                        add_opinion = {
                            target = scope:me_scope
                            modifier = heard_bad_rumours_opinion
                        }
                    }
                }

                scope:my_friend = {
                    add_prestige = -150
                }
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = {  #You take your friends advice, but pass it off as your own idea
        name = friends_rivals_interactions_events.1007.c
        custom_tooltip = friends_rivals_interactions_events.1007.c.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = deceitful
                has_trait = craven
                has_trait = cynical
            }
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        scope:my_friend = {
            add_prestige = -50
            add_opinion = {
                target = scope:me_scope
                modifier = bad_friend_reputation_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 50
            add_piety = -50
            stress_impact = {
                honest = medium_stress_impact_gain
                patient = medium_stress_impact_gain
                just = medium_stress_impact_gain
                deceitful = medium_stress_impact_loss
                cynical = medium_stress_impact_loss
                callous = medium_stress_impact_loss
                craven = medium_stress_impact_loss
            }
        }

        hidden_effect = {
            every_living_character = {
                limit = { age > 25 is_vassal_of = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
                add_opinion = {
                    target = scope:me_scope
                    modifier = humored_opinion
                }
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = {  #You let you friend take all the credit for the advice, which makes them very happy and strengthens your friendship
        name = friends_rivals_interactions_events.1007.d
        custom_tooltip = friends_rivals_interactions_events.1007.d.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = honest
                has_trait = just
                has_trait = compassionate
            }
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        scope:my_friend = {
            add_prestige = 50
            add_opinion = {
                target = scope:me_scope
                modifier = comrades_in_arms_opinion
            }
        }

        scope:me_scope = {
            add_prestige = -50
            add_piety = 50
            stress_impact = {
                honest = medium_stress_impact_loss
                patient = medium_stress_impact_loss
                just = medium_stress_impact_loss
                deceitful = medium_stress_impact_gain
                cynical = medium_stress_impact_gain
                callous = medium_stress_impact_gain
                craven = medium_stress_impact_gain
            }
        }

        hidden_effect = {
            every_living_character = {
                limit = { age > 25 is_vassal_of = scope:me_scope NOT = { is_close_family_of = scope:me_scope} NOT = { is_spouse_of = scope:me_scope } }
                add_opinion = {
                    target = scope:my_friend
                    modifier = humored_opinion
                }
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }
}

friends_rivals_interactions_events.1008 = {   #A Friendly Competition
    title = friends_rivals_interactions_events.1008.t
    desc = friends_rivals_interactions_events.1008.desc
    type = character_event

    theme = friendly
    override_background = {reference = armory }  

    left_portrait = { 
        character = ROOT 
        animation = rage
    }

    right_portrait = { 
        character = scope:my_friend
        animation = aggressive_sword
    }

    immediate = {
        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }
    }

    option = {   #You compete with your friend, though subtly dislike how aggressive the they are in the competition
        name = friends_rivals_interactions_events.1008.a
        custom_tooltip = friends_rivals_interactions_events.1008.a.tooltip

        trigger = { 
            is_alive = yes
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        scope:my_friend = {
            add_prestige = 50
            add_opinion = {
                target = scope:me_scope
                modifier = unfriendly_opinion
            }
        }

        scope:me_scope = {
            add_prestige = -50
            add_piety = 50
            stress_impact = {
                calm = medium_stress_impact_loss
                patient = medium_stress_impact_loss
                just = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                impatient = medium_stress_impact_gain
                callous = medium_stress_impact_gain
                vengeful = medium_stress_impact_gain
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = {  #You take sly shots at how competitive your friend is...which leads to some tension between you two
        name = friends_rivals_interactions_events.1008.b
        custom_tooltip = friends_rivals_interactions_events.1008.b.tooltip

        trigger = { 
            is_alive = yes
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        scope:my_friend = {
            add_prestige = -50
            add_opinion = {
                target = scope:me_scope
                modifier = agitated_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 50
            add_piety = -50
            stress_impact = {
                calm = medium_stress_impact_gain
                patient = medium_stress_impact_gain
                just = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                impatient = medium_stress_impact_loss
                callous = medium_stress_impact_loss
                vengeful = medium_stress_impact_loss
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = {  #You let your friend's overcompetitivness breeze away like the wind, and allowing them to see the error of their ways, which strengthens your friendship
        name = friends_rivals_interactions_events.1008.c
        custom_tooltip = friends_rivals_interactions_events.1008.c.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = calm
                has_trait = patient
                has_trait = just
            }
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        scope:my_friend = {
            add_prestige = 100
            add_piety = 100
            add_opinion = {
                target = scope:me_scope
                modifier = loyal_servant
            }
        }

        scope:me_scope = {
            add_prestige = 100
            add_piety = -100
            stress_impact = {
                calm = medium_stress_impact_loss
                patient = medium_stress_impact_loss
                just = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                impatient = medium_stress_impact_gain
                callous = medium_stress_impact_gain
                vengeful = medium_stress_impact_gain
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = {  #You explode at your friend for their competitivness, which does relieve the stress you have been feeling about it, but also greatly harms your friendship
        name = friends_rivals_interactions_events.1008.d
        custom_tooltip = friends_rivals_interactions_events.1008.d.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = arrogant
                has_trait = impatient
                has_trait = callous
                has_trait = vengeful
            }
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        scope:my_friend = {
            add_prestige = -150
            add_opinion = {
                target = scope:me_scope
                modifier = rejected_by_friend_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 150
            add_piety = -150
            stress_impact = {
                calm = medium_stress_impact_gain
                patient = medium_stress_impact_gain
                just = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                impatient = medium_stress_impact_loss
                callous = medium_stress_impact_loss
                vengeful = medium_stress_impact_loss
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = { #You are insane, and thus the only way to up the anti is to be even more competitive than your friend. A FIGHT TO THE DEATH IS REQUIRED!
        name = friends_rivals_interactions_events.1008.e
        custom_tooltip = friends_rivals_interactions_events.1008.e.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = lunatic_1
                has_trait = possessed_1
            }
        }

        ROOT = {
            save_scope_as = me_scope
            save_scope_as = duel_attacker
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
            save_scope_as = duel_defender
        }

        scope:my_friend = {
            add_prestige = -250
            add_opinion = {
                target = scope:me_scope
                modifier = bitter_rivalry_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 250
            add_piety = -250
            stress_impact = {
                lunatic_1 = medium_stress_impact_loss
                possessed_1 = medium_stress_impact_loss
                calm = medium_stress_impact_gain
                patient = medium_stress_impact_gain
                just = medium_stress_impact_gain
                arrogant = medium_stress_impact_gain
                impatient = medium_stress_impact_loss
                callous = medium_stress_impact_loss
                vengeful = medium_stress_impact_loss
            }
        }

        configure_start_single_combat_effect = {
			SC_INITIATOR = scope:duel_attacker
			SC_ATTACKER = scope:duel_attacker
			SC_DEFENDER = scope:duel_defender
			FATALITY = always
			FIXED = no
			LOCALE = terrain_scope
			OUTPUT_EVENT = perk_interaction.0101
			INVALIDATION_EVENT = perk_interaction.0102   #single_combat.1006
		}

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }
}

friends_rivals_interactions_events.1009 = {   #The Illness Vigil
    title = friends_rivals_interactions_events.1009.t
    desc = friends_rivals_interactions_events.1009.desc
    type = character_event

    theme = friendly
    override_background = {reference = physicians_study }  

    left_portrait = { 
        character = ROOT 
        animation = worry
    }

    right_portrait = { 
        character = scope:my_friend
        animation = sick
    }

    immediate = {
        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }
    }

    option = {  #Despite your hesitations, you decide to stay by your friend's side and help them through their illness, which they greatly appreciate
        name = friends_rivals_interactions_events.1009.a
        custom_tooltip = friends_rivals_interactions_events.1009.a.tooltip

        trigger = {
            is_alive = yes
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        scope:my_friend = {
            add_trait = pneumonic
            add_prestige = 50
            add_opinion = {
                target = scope:me_scope
                modifier = optimistic_about_friendship_opinion
            }
        }

        scope:me_scope = {
            add_prestige = -50
            add_piety = 50
            stress_impact = {
                calm = medium_stress_impact_loss
                zealous = medium_stress_impact_loss
                humble = medium_stress_impact_loss
                arrogant = medium_stress_impact_loss
                craven = medium_stress_impact_loss
                callous = medium_stress_impact_loss
                cynical = medium_stress_impact_loss
            }
        }

        random_list = {
            15 = {  #You get sick as well, but your friend will never forget what you did for them
                scope:me_scope = {
                    add_trait = pneumonic
                    add_piety = 200
                }
            }

            85 = {  #You do not get sick, but your friend knows you stayed by their side and they will never forget it
                scope:me_scope = {
                    add_piety = 150
                }
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = {  #You are terrified of getting sick, so you decide to stay away from your friend while they are ill, which they understand but are still a bit hurt by
        name = friends_rivals_interactions_events.1009.b
        custom_tooltip = friends_rivals_interactions_events.1009.b.tooltip

        trigger = {
            is_alive = yes
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        scope:my_friend = {
            add_trait = pneumonic
            add_prestige = -50
            add_opinion = {
                target = scope:me_scope
                modifier = rejected_by_friend_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 50
            add_piety = -50
            stress_impact = {
                calm = medium_stress_impact_gain
                zealous = medium_stress_impact_gain
                humble = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                craven = medium_stress_impact_loss
                callous = medium_stress_impact_loss
                cynical = medium_stress_impact_loss
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = {  #You will not risk getting sick yourself! You tell your friend you will not visit them until they are better, which greatly hurts their feelings and harms your friendship
        name = friends_rivals_interactions_events.1009.c
        custom_tooltip = friends_rivals_interactions_events.1009.c.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = arrogant
                has_trait = craven
                has_trait = callous
                has_trait = cynical
            }
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        scope:my_friend = {
            add_trait = pneumonic
            add_prestige = -150
            add_opinion = {
                target = scope:me_scope
                modifier = rejected_by_friend_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 150
            add_piety = -150
            stress_impact = {
                calm = medium_stress_impact_gain
                zealous = medium_stress_impact_gain
                humble = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                craven = medium_stress_impact_loss
                callous = medium_stress_impact_loss
                cynical = medium_stress_impact_loss
            }
        }

        random_list = {
            50 = {  #The two of you drift away
                scope:my_friend = {
                    remove_relation_friend = scope:me_scope
                }
            }

            50 = {  #Nothing happens

            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = {  #You devout yourself to your friend and care for them through their illness
        name = friends_rivals_interactions_events.1009.d
        custom_tooltip = friends_rivals_interactions_events.1009.d.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = paragon
            }
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        scope:my_friend = {
            add_trait = pneumonic
            add_prestige = 250
            add_opinion = {
                target = scope:me_scope
                modifier = loyal_servant
            }
        }

        scope:me_scope = {
            add_prestige = -250
            add_piety = 250
            stress_impact = {
                calm = medium_stress_impact_loss
                zealous = medium_stress_impact_loss
                humble = medium_stress_impact_loss
                arrogant = medium_stress_impact_loss
                craven = medium_stress_impact_loss
                callous = medium_stress_impact_loss
                cynical = medium_stress_impact_loss
            }
        }

        random_list = {
            85 = {  #You get sick as well, but your friend will never forget what you did for them
                scope:me_scope = {
                    add_trait = pneumonic
                    add_piety = 350
                }
            }

            15 = {  #You do not get sick, but your friend knows you stayed by their side and they will never forget it
                scope:me_scope = {
                    add_piety = 150
                }
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }
}

friends_rivals_interactions_events.1010 = {  #The Quick Defense!
    title = friends_rivals_interactions_events.1010.t
    desc = friends_rivals_interactions_events.1010.desc
    type = character_event

    theme = friendly
    override_background = {reference = throne_room_scope }  

    left_portrait = { 
        character = ROOT 
        animation = shock
    }

    right_portrait = { 
        character = scope:my_friend
        animation = anger
    }

    immediate = {
        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        random_living_character = {
            limit = { age > 16 is_vassal_of = scope:me_scope NOT = { has_relation_friend = scope:my_friend } NOT = { is_close_family_of = scope:my_friend} NOT = { is_spouse_of = scope:my_friend } }
            add_character_flag = my_vassal_interaction_flag
            save_scope_as = vassal_scope
        }
    }

    option = {   #You do your best to smooth down the tension in the room, but it does little to prevent the rivarly between your vassal and your friend
        name = friends_rivals_interactions_events.1010.a
        custom_tooltip = friends_rivals_interactions_events.1010.a.tooltip

        trigger = {
            is_alive = yes
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        random_living_character = {
            limit = { has_character_flag = my_vassal_interaction_flag }
            save_scope_as = vassal_scope
        }

        scope:vassal_scope = {
            add_prestige = 50
            add_opinion = {
                target = scope:my_friend
                modifier = bitter_rivalry_opinion
            }
        }

        scope:my_friend = {
            add_prestige = 50
            add_opinion = {
                target = scope:vassal_scope
                modifier = bitter_rivalry_opinion
            }
        }

        scope:me_scope = {
            add_prestige = -50
            add_piety = 50
            stress_impact = {
                calm = medium_stress_impact_gain
                patient = medium_stress_impact_gain
                just = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                impatient = medium_stress_impact_loss
                callous = medium_stress_impact_loss
                vengeful = medium_stress_impact_loss
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }

        scope:vassal_scope = {
            remove_character_flag = my_vassal_interaction_flag
        }
    }

    option = {   #You let the tension between your vassal and your friend boil over but secretly enjoy the drama that unfolds
        name = friends_rivals_interactions_events.1010.b
        custom_tooltip = friends_rivals_interactions_events.1010.b.tooltip

        trigger = {
            is_alive = yes
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        random_living_character = {
            limit = { has_character_flag = my_vassal_interaction_flag }
            save_scope_as = vassal_scope
        }

        scope:vassal_scope = {
            add_prestige = 150
            add_opinion = {
                target = scope:my_friend
                modifier = bitter_rivalry_opinion
            }
        }

        scope:my_friend = {
            add_prestige = 150
            add_opinion = {
                target = scope:vassal_scope
                modifier = bitter_rivalry_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 150
            add_piety = -150
            stress_impact = {
                calm = medium_stress_impact_gain
                patient = medium_stress_impact_gain
                just = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                impatient = medium_stress_impact_loss
                callous = medium_stress_impact_loss
                vengeful = medium_stress_impact_loss
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }

        scope:vassal_scope = {
            remove_character_flag = my_vassal_interaction_flag
        }
    }

    option = {   #You quickly step in and side with your vassal due to their rank and status, which greatly harms your friendship but also greatly strengthens your relationship with your vassal
        name = friends_rivals_interactions_events.1010.c
        custom_tooltip = friends_rivals_interactions_events.1010.c.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = just
                has_trait = calm
                has_trait = patient
            }
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        random_living_character = {
            limit = { has_character_flag = my_vassal_interaction_flag }
            save_scope_as = vassal_scope
        }

        scope:vassal_scope = {
            add_prestige = 250
            add_opinion = {
                target = scope:me_scope
                modifier = loyal_servant
            }
        }

        scope:my_friend = {
            add_prestige = -250
            add_opinion = {
                target = scope:me_scope
                modifier = rejected_by_friend_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 250
            add_piety = -250
            stress_impact = {
                calm = medium_stress_impact_loss
                patient = medium_stress_impact_loss
                just = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                impatient = medium_stress_impact_gain
                brave = medium_stress_impact_gain
                callous = medium_stress_impact_gain
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }

        scope:vassal_scope = {
            remove_character_flag = my_vassal_interaction_flag
        }
    }

    option = {  #You launch a stern rebuke of your vassal in defense of your friend, which greatly strengthens your friendship but also harms your relationship with your vassal
        name = friends_rivals_interactions_events.1010.d
        custom_tooltip = friends_rivals_interactions_events.1010.d.tooltip

        trigger = { 
            is_alive = yes
            OR = {
                has_trait = arrogant
                has_trait = brave
                has_trait = arbitrary
            }
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        random_living_character = {
            limit = { has_character_flag = my_vassal_interaction_flag }
            save_scope_as = vassal_scope
        }

        scope:vassal_scope = {
            add_prestige = -250
            add_unpressed_claim = scope:me_scope.primary_title
            add_opinion = {
                target = scope:me_scope
                modifier = distrustful
            }
        }

        scope:my_friend = {
            add_prestige = 250
            add_opinion = {
                target = scope:me_scope
                modifier = loyal_servant
            }
        }

        scope:me_scope = {
            add_prestige = -150
            add_piety = 150
            stress_impact = {
                calm = medium_stress_impact_gain
                patient = medium_stress_impact_gain
                just = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                impatient = medium_stress_impact_loss
                brave = medium_stress_impact_loss
                callous = medium_stress_impact_loss
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }

        scope:vassal_scope = {
            remove_character_flag = my_vassal_interaction_flag
        }
    }
}

friends_rivals_interactions_events.1011 = {   #The Joint Venture That May Or May Not Be Moral
    title = friends_rivals_interactions_events.1011.t
    desc = friends_rivals_interactions_events.1011.desc
    type = character_event

    theme = friendly
    override_background = {reference = garden }  

    left_portrait = { 
        character = ROOT 
        animation = thinking
    }

    right_portrait = { 
        character = scope:my_friend
        animation = personality_dishonorable
    }

    immediate = {
        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }
    }

    option = {   #You tell your friend that this is a bad idea and that you will not be a part of it, but let them do it anyway
        name = friends_rivals_interactions_events.1011.a
        custom_tooltip = friends_rivals_interactions_events.1011.a.tooltip

        trigger = {
            is_alive = yes
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        scope:my_friend = {
            add_prestige = -150
            add_opinion = {
                target = scope:me_scope
                modifier = rejected_by_friend_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 150
            add_piety = -150
            stress_impact = {
                calm = medium_stress_impact_loss
                zealous = medium_stress_impact_loss
                humble = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                brave = medium_stress_impact_gain
                deceitful = medium_stress_impact_gain
                cynical = medium_stress_impact_gain
            }
        }

        random_list = {
            50 = {  #It was a bad idea and it blows up in your friend's face
                scope:my_friend = { 
                    add_piety = -200
                }
            }

            50 = {  #It was not nearly as bad as it sounded and it actually goes pretty well for your friend
                scope:my_friend = {
                    add_prestige = 200
                    add_piety = 200
                }
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = {  #You still think it is a bad idea, but you decide to join your friend in this venture...
        name = friends_rivals_interactions_events.1011.b
        custom_tooltip = friends_rivals_interactions_events.1011.b.tooltip

        trigger = {
            is_alive = yes
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        scope:my_friend = {
            add_prestige = 150
            add_opinion = {
                target = scope:me_scope
                modifier = increased_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 150
            add_piety = -150
            stress_impact = {
                calm = medium_stress_impact_gain
                zealous = medium_stress_impact_gain
                humble = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                brave = medium_stress_impact_loss
                deceitful = medium_stress_impact_loss
                cynical = medium_stress_impact_loss
            }
        }

        random_list = {
            50 = {  #It was a bad idea and it blows up in your friend's face, which also harms you due to your involvement
                scope:my_friend = { 
                    add_piety = -200
                }
                scope:me_scope = {
                    add_prestige = -100
                    add_piety = -100
                }
            }

            50 = {  #It was not nearly as bad as it sounded and it actually goes pretty well for your friend, which also benefits you due to your involvement
                scope:my_friend = {
                    add_prestige = 200
                    add_piety = 200
                }
                scope:me_scope = {
                    add_prestige = 100
                    add_piety = 100
                }
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = { #You tell your friend that it sounds ignoble and horrible, and that you will have no part in it!
        name = friends_rivals_interactions_events.1011.c
        custom_tooltip = friends_rivals_interactions_events.1011.c.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = just
                has_trait = zealous
                has_trait = humble
            }
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        scope:my_friend = {
            add_prestige = -250
            add_opinion = {
                target = scope:me_scope
                modifier = rejected_by_friend_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 250
            add_piety = -250
            stress_impact = {
                calm = medium_stress_impact_loss
                zealous = medium_stress_impact_loss
                humble = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                brave = medium_stress_impact_gain
                deceitful = medium_stress_impact_gain
                cynical = medium_stress_impact_gain
            }
        }

        random_list = {
            25 = {  #You were right. It was a bad idea and it blows up in your friend's face
                scope:my_friend = { 
                    add_piety = -200
                }
            }

            75 = {  #You were wrong. It was not nearly as bad as it sounded and it actually goes pretty well for your friend
                scope:my_friend = {
                    add_prestige = 200
                    add_piety = 200
                }
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = {  #You happily go along with your friends idea and even add a few more to your own...which definitely turns it into a immoral adventure
        name = friends_rivals_interactions_events.1011.d
        custom_tooltip = friends_rivals_interactions_events.1011.d.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = callous
                has_trait = deceitful
                has_trait = cynical
            }
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        scope:my_friend = {
            add_prestige = 250
            add_piety = -250
            add_opinion = {
                target = scope:me_scope
                modifier = increased_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 250
            add_piety = -250
            stress_impact = {
                calm = medium_stress_impact_gain
                zealous = medium_stress_impact_gain
                humble = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                brave = medium_stress_impact_loss
                deceitful = medium_stress_impact_loss
                cynical = medium_stress_impact_loss
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }
}

friends_rivals_interactions_events.1012 = {  #The Gift Refused
    title = friends_rivals_interactions_events.1012.t
    desc = friends_rivals_interactions_events.1012.desc
    type = character_event

    theme = friendly
    override_background = {reference = throne_room_scope }  

    left_portrait = { 
        character = ROOT 
        animation = shock
    }

    right_portrait = { 
        character = scope:my_friend
        animation = stayback
    }

    immediate = {
        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }
    }

    option = {  #You are a little perturbed by your friend's refusal of the gift, but you know their heart is in the right place and move on
        name = friends_rivals_interactions_events.1012.a
        custom_tooltip = friends_rivals_interactions_events.1012.a.tooltip

        trigger = {
            is_alive = yes
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        scope:my_friend = {
            add_prestige = -50
            add_opinion = {
                target = scope:me_scope
                modifier = friendly_interaction
            }
        }

        scope:me_scope = {
            add_prestige = 50
            add_piety = -50
            stress_impact = {
                calm = medium_stress_impact_loss
                compassionate = medium_stress_impact_loss
                humble = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                brave = medium_stress_impact_gain
                deceitful = medium_stress_impact_gain
                cynical = medium_stress_impact_gain
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = {  #You get into a spat with your friend over their refusal of the gift, which harms your friendship but at least you got to let out some of the stress you have been feeling about it
        name = friends_rivals_interactions_events.1012.b
        custom_tooltip = friends_rivals_interactions_events.1012.b.tooltip

        trigger = {
            is_alive = yes
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        scope:my_friend = {
            add_prestige = -150
            add_opinion = {
                target = scope:me_scope
                modifier = rejected_by_friend_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 150
            add_piety = -150
            stress_impact = {
                calm = medium_stress_impact_gain
                compassionate = medium_stress_impact_gain
                humble = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                brave = medium_stress_impact_loss
                deceitful = medium_stress_impact_loss
                cynical = medium_stress_impact_loss
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = {  #You are absolutely livid that your friend refused your gift, and you let them know it in no uncertain terms, which greatly harms your friendship but also greatly relieves your stress
        name = friends_rivals_interactions_events.1012.c
        custom_tooltip = friends_rivals_interactions_events.1012.c.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = callous
                has_trait = vengeful
                has_trait = arrogant
            }
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        scope:my_friend = {
            add_prestige = -250
            add_opinion = {
                target = scope:me_scope
                modifier = blamed_me_unjustly
            }
        }

        scope:me_scope = {
            add_prestige = 250
            add_piety = -250
            stress_impact = {
                calm = medium_stress_impact_gain
                compassionate = medium_stress_impact_gain
                humble = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                brave = medium_stress_impact_loss
                deceitful = medium_stress_impact_loss
                cynical = medium_stress_impact_loss
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = {  #You understand that your friend has their reasons for refusing the gift, and you respect their decision, which greatly strengthens your friendship and also greatly relieves your stress
        name = friends_rivals_interactions_events.1012.d
        custom_tooltip = friends_rivals_interactions_events.1012.d.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = calm
                has_trait = compassionate
                has_trait = humble
            }
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        scope:my_friend = {
            add_prestige = 250
            add_opinion = {
                target = scope:me_scope
                modifier = comforted_opinion
            }
        }

        scope:me_scope = {
            add_prestige = -250
            add_piety = 250
            stress_impact = {
                calm = medium_stress_impact_loss
                compassionate = medium_stress_impact_loss
                humble = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                brave = medium_stress_impact_gain
                deceitful = medium_stress_impact_gain
                cynical = medium_stress_impact_gain
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }
}

friends_rivals_interactions_events.1013 = {  #The Pact of Trust
    title = friends_rivals_interactions_events.1013.t
    desc = friends_rivals_interactions_events.1013.desc
    type = character_event

    theme = friendly
    override_background = {reference = garden }  

    left_portrait = { 
        character = ROOT 
        animation = thinking
    }

    right_portrait = { 
        character = scope:my_friend
        animation = personality_rational
    }

    immediate = {
        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }
    }

    option = {  #You tell no one of the secret your friend has told you, though you do feel a little differently around them now
        name = friends_rivals_interactions_events.1013.a
        custom_tooltip = friends_rivals_interactions_events.1013.a.tooltip

        trigger = {
            is_alive = yes
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        scope:my_friend = {
            add_prestige = 50
            add_opinion = {
                target = scope:me_scope
                modifier = unfriendly_opinion
            }
        }

        scope:me_scope = {
            add_prestige = -50
            add_piety = 50
            stress_impact = {
                calm = medium_stress_impact_loss
                compassionate = medium_stress_impact_loss
                humble = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                impatient = medium_stress_impact_gain
                deceitful = medium_stress_impact_gain
                cynical = medium_stress_impact_gain
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = { #You tell your friend that you will keep their secret, though you tell them that you think less of them for it, which harms your friendship but at least you are honest about it
        name = friends_rivals_interactions_events.1013.b
        custom_tooltip = friends_rivals_interactions_events.1013.b.tooltip

        trigger = {
            is_alive = yes
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        scope:my_friend = {
            add_prestige = -50
            add_opinion = {
                target = scope:me_scope
                modifier = rejected_by_friend_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 50
            add_piety = -50
            stress_impact = {
                calm = medium_stress_impact_gain
                compassionate = medium_stress_impact_gain
                humble = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                impatient = medium_stress_impact_loss
                deceitful = medium_stress_impact_loss
                cynical = medium_stress_impact_loss
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = {  #You tell your friend that you will keep their secret and that it does not change how you feel about them at all, which greatly strengthens your friendship 
        name = friends_rivals_interactions_events.1013.c
        custom_tooltip = friends_rivals_interactions_events.1013.c.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = calm
                has_trait = compassionate
                has_trait = humble
            }
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        scope:my_friend = {
            add_prestige = 150
            add_opinion = {
                target = scope:me_scope
                modifier = loyal_servant
            }
        }

        scope:me_scope = {
            add_prestige = -150
            add_piety = 150
            stress_impact = {
                calm = medium_stress_impact_loss
                compassionate = medium_stress_impact_loss
                humble = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                impatient = medium_stress_impact_gain
                deceitful = medium_stress_impact_gain
                cynical = medium_stress_impact_gain
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = {  #You tell your friend that you will keep their secret...so long as you now have a hook over them. Not a great friend move, but at least you now control them easier
        name = friends_rivals_interactions_events.1013.d
        custom_tooltip = friends_rivals_interactions_events.1013.d.tooltip

        trigger = {
            is_alive = yes 
            OR = {
                has_trait = deceitful
                has_trait = callous
                has_trait = cynical
            }
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        scope:my_friend = {
            add_prestige = -150
            add_opinion = {
                target = scope:me_scope
                modifier = distrustful
            }
        }

        scope:me_scope = {
            add_prestige = 150
            add_piety = -150
            add_hook_if_possible_default_length_effect = {
                TARGET = scope:my_friend
                TYPE = manipulation_hook
            }
            stress_impact = {
                calm = medium_stress_impact_gain
                compassionate = medium_stress_impact_gain
                humble = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                impatient = medium_stress_impact_loss
                deceitful = medium_stress_impact_loss
                cynical = medium_stress_impact_loss
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }
}

friends_rivals_interactions_events.1014 = {  #The Long Goodbye
    title = friends_rivals_interactions_events.1014.t
    desc = friends_rivals_interactions_events.1014.desc
    type = character_event

    theme = friendly
    override_background = {reference = courtyard } 

    left_portrait = { 
        character = ROOT 
        animation = shock
    }

    right_portrait = { 
        character = scope:my_friend
        animation = sadness
    }

    immediate = {
        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }
    }

    option = {  #You are sad to learn of your friends long departure, and selfishly want them to stay...though you put on a brave face and wish them goodbye
        name = friends_rivals_interactions_events.1014.a
        custom_tooltip = friends_rivals_interactions_events.1014.a.tooltip

        trigger = {
            is_alive = yes
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        scope:my_friend = {
            add_prestige = 50
            add_opinion = {
                target = scope:me_scope
                modifier = increased_opinion
            }
        }

        scope:me_scope = {
            add_prestige = -50
            add_piety = 50
            stress_impact = {
                calm = medium_stress_impact_loss
                compassionate = medium_stress_impact_loss
                humble = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                impatient = medium_stress_impact_gain
                deceitful = medium_stress_impact_gain
                cynical = medium_stress_impact_gain
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = {  #You are sad to learn of your friends long departure, and selfishly want them to stay...and you say this too them in a softer tone, which strains your friendship slightly 
        name = friends_rivals_interactions_events.1014.b
        custom_tooltip = friends_rivals_interactions_events.1014.b.tooltip

        trigger = {
            is_alive = yes
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        scope:my_friend = {
            add_prestige = -50
            add_opinion = {
                target = scope:me_scope
                modifier = rejected_by_friend_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 50
            add_piety = -50
            stress_impact = {
                calm = medium_stress_impact_gain
                compassionate = medium_stress_impact_gain
                humble = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                impatient = medium_stress_impact_loss
                deceitful = medium_stress_impact_loss
                cynical = medium_stress_impact_loss
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = {  #You see this departure is really necessary for your friend, and so you give them your full backing and blessing!
        name = friends_rivals_interactions_events.1014.c
        custom_tooltip = friends_rivals_interactions_events.1014.c.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = humble
                has_trait = calm
                has_trait = compassionate
            }
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        scope:my_friend = {
            add_prestige = 150
            add_opinion = {
                target = scope:me_scope
                modifier = stood_by_me_opinion
            }
        }

        scope:me_scope = {
            add_prestige = -150
            add_piety = 150
            stress_impact = {
                calm = medium_stress_impact_loss
                compassionate = medium_stress_impact_loss
                humble = medium_stress_impact_loss
                arrogant = medium_stress_impact_gain
                impatient = medium_stress_impact_gain
                deceitful = medium_stress_impact_gain
                cynical = medium_stress_impact_gain
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }

    option = {  #You utterly unload on your friend for them being so inconsiderate of your feelings...which does not endure you to them very much at all
        name = friends_rivals_interactions_events.1014.d
        custom_tooltip = friends_rivals_interactions_events.1014.d.tooltip

        trigger = {
            is_alive = yes
            OR = {
                has_trait = arrogant
                has_trait = callous
            }
        }

        ROOT = {
            save_scope_as = me_scope
        }

        random_living_character = {
            limit = { has_character_flag = friend_interaction_flag }
            save_scope_as = my_friend
        }

        scope:my_friend = {
            add_prestige = -150
            add_opinion = {
                target = scope:me_scope
                modifier = rude_opinion
            }
        }

        scope:me_scope = {
            add_prestige = 150
            add_piety = -150
            stress_impact = {
                calm = medium_stress_impact_gain
                compassionate = medium_stress_impact_gain
                humble = medium_stress_impact_gain
                arrogant = medium_stress_impact_loss
                impatient = medium_stress_impact_loss
                vengeful = medium_stress_impact_loss
                callous = medium_stress_impact_loss
            }
        }

        scope:my_friend = {
            remove_character_flag = friend_interaction_flag
        }
    }
}